Erroneous Forward Slash in HTML Code by CGI.pm 
Author Message
 Erroneous Forward Slash in HTML Code by CGI.pm

I use CGI.pm to write a lot of HTML code for me.
I installed the new CGI.pm 2.74 and found that my
HTML code had a forward slash at the end of input
fields simlilar to what you see below.
Perl:textfield('palmnum','somevalue',15,15)
HTML:<input type="text" name="palmnum"  size=15
maxlength=15 />
I do not have this problem with the CGI.pm 2.68
module.  Any ideas what could be problem?
Thanks,
Micah Gersten

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Erroneous Forward Slash in HTML Code by CGI.pm

Quote:

> I use CGI.pm to write a lot of HTML code for me.
> I installed the new CGI.pm 2.74 and found that my
> HTML code had a forward slash at the end of input
> fields simlilar to what you see below.
> Perl:textfield('palmnum','somevalue',15,15)
> HTML:<input type="text" name="palmnum"  size=15
> maxlength=15 />
> I do not have this problem with the CGI.pm 2.68
> module.  Any ideas what could be problem?

From the CGI.pm docs:

     By default, CGI.pm versions 2.69 and higher emit XHTML
     (http://www.w3.org/TR/xhtml1/). The -no_xhtml pragma
     disables this feature.

XHTML uses a slash on tags that don't have end tags. It shouldn't matter
in this case since AFAIK all browsers will display the tags with the
trailing slash as long as there is a space before it.

--
Jeff



Wed, 18 Jun 1902 08:00:00 GMT  
 Erroneous Forward Slash in HTML Code by CGI.pm


Quote:
>From the CGI.pm docs:

>     By default, CGI.pm versions 2.69 and higher emit XHTML
>     (http://www.w3.org/TR/xhtml1/). The -no_xhtml pragma
>     disables this feature.

>XHTML uses a slash on tags that don't have end tags. It shouldn't matter
>in this case since AFAIK all browsers will display the tags with the
>trailing slash as long as there is a space before it.

Not, apparently, with Navigator 4.06 (which is what I happen to have
lying around on this machine...).  <p/> gets ignored.  Ick.

I'm still unclear how I feel about that default behavior... :-/

dha

--

Tegan's always being posessed!  She just wants attention.
        - Adric



Wed, 18 Jun 1902 08:00:00 GMT  
 Erroneous Forward Slash in HTML Code by CGI.pm

Quote:



> >From the CGI.pm docs:

> >     By default, CGI.pm versions 2.69 and higher emit XHTML
> >     (http://www.w3.org/TR/xhtml1/). The -no_xhtml pragma
> >     disables this feature.

> >XHTML uses a slash on tags that don't have end tags. It shouldn't matter
> >in this case since AFAIK all browsers will display the tags with the
> >trailing slash as long as there is a space before it.

> Not, apparently, with Navigator 4.06 (which is what I happen to have
> lying around on this machine...).  <p/> gets ignored.  Ick.

Did you catch those last nine words in the part my posting you cited?

Try <p />, not <p/>.   Maybe it doesn't work either, but at least give
it a shot and let me know.

--
Jeff



Wed, 18 Jun 1902 08:00:00 GMT  
 Erroneous Forward Slash in HTML Code by CGI.pm


Quote:



>> >From the CGI.pm docs:

>> >     By default, CGI.pm versions 2.69 and higher emit XHTML
>> >     (http://www.w3.org/TR/xhtml1/). The -no_xhtml pragma
>> >     disables this feature.

>> >XHTML uses a slash on tags that don't have end tags. It shouldn't matter
>> >in this case since AFAIK all browsers will display the tags with the
>> >trailing slash as long as there is a space before it.

>> Not, apparently, with Navigator 4.06 (which is what I happen to have
>> lying around on this machine...).  <p/> gets ignored.  Ick.

>Did you catch those last nine words in the part my posting you cited?

>Try <p />, not <p/>.   Maybe it doesn't work either, but at least give
>it a shot and let me know.

Yes, I caught the words and horribly misparsed them... :-/  Sorry.

Yeah, it works.  interesingly, <p/> only behaves differently for
netscape - lynx and IE seem to deal with it fine.  odd.

dha

--

All hail El Cabeza Del Oro!  <http://www.panix.com/~dha/elcabeza.html>



Wed, 18 Jun 1902 08:00:00 GMT  
 Erroneous Forward Slash in HTML Code by CGI.pm
Unfortunately, it seems almost everything behaves differently in Netscape
for me.  :o(

</Colin>



Quote:
> Yeah, it works.  interesingly, <p/> only behaves differently for
> netscape - lynx and IE seem to deal with it fine.  odd.



Sun, 06 Apr 2003 04:58:53 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Changing back slashes to forward slashes

2. back vs. forward slash

3. Substituting backslash for 2 forward slashes

4. CGI.pm,, LWP.pm or HTML.pm

5. Help weird html with CGI.pm and Ispell.pm

6. Can't locate Slash.pm in @INC

7. CGI.pm automatically runs code without waiting for submit button

8. mod_perl coding convetions with CGI.pm

9. cgi.pm code

10. small CGI.pm hack, code review request

11. CGI.pm enhancements - with source code

12. Stripping HTML coding from CGI data for Perl

 

 
Powered by phpBB® Forum Software