I was wondering if one or more of you could visit the following webpage: http://www.monachos.net/forum/forum.php. At the very top of the page, I am seeing the following line of code: '); var sidebar_align = 'right'; var content_container_margin = parseInt('290px'); var sidebar_width = parseInt('270px'); //--> . Is anyone else seeing this?
I assume that this is a specific Camino-related "problem." I do not see the code when I visit the page using either Safari or Firefox.
This doesn't bother me, but I am curious about what is happening. Is this a sign that Camino is a little bit behind the times? Thanks.
Al
I'm seeing HTML coding
Moderator: Camino Developers
- cflawson
- Posts: 4721
- Joined: December 26th, 2004, 2:54 pm
- Location: Flying over your house in a red, white, and blue jet
- Contact:
Re: I'm seeing HTML coding
That's normally a problem with the server-side code. I don't know specifically why Firefox (I assume you're using a newer version of Firefox than 3.6) doesn't show it, but there's clearly an improperly quoted HTML tag inside a script:
The webmaster needs to fix that. (There should be a double-quote immediately after the single-quote before, so instead of it should be .)
cl
Code: Select all
document.write('<script type="text/javascript" src="' + yuipath + '/animation/animation-min.js?v=4111"></script>');
The webmaster needs to fix that. (There should be a double-quote immediately after the single-quote before
Code: Select all
/animation
Code: Select all
'/animation...
Code: Select all
'"animation...
cl
- Uncle Asad
- Camino Developer
- Posts: 3957
- Joined: July 24th, 2004, 1:38 pm
- Location: بين العالمين
- Contact:
Re: I'm seeing HTML coding
cflawson wrote:That's normally a problem with the server-side code. I don't know specifically why Firefox (I assume you're using a newer version of Firefox than 3.6) doesn't show it, but there's clearly an improperly quoted HTML tag inside a script:
No, that double-quote opened in the first block (src=") and closed at the end of the last one (v=4111">)
If you had a double-quote before animation, then the full script tag would be
Code: Select all
<script type="text/javascript" src=""whatever-yuipath-is/animation/animation-min.js?v=4111"></script>
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQ Search the Forum Camino. Help Troubleshoot Camino
Snow7's Camino Forum FAQ Search the Forum Camino. Help Troubleshoot Camino
- Uncle Asad
- Camino Developer
- Posts: 3957
- Joined: July 24th, 2004, 1:38 pm
- Location: بين العالمين
- Contact:
Re: I'm seeing HTML coding
Also, I suspect (and maybe phiw13 can confirm) that this is a change related to the HTML5 parser's handling of bad markup (the HTML5 parser is more tolerant of bad markup than the old HTML parser, which Camino uses).
The error that gets shown is: JavaScript Error: "unterminated string literal"
Oh, what's happening is that the parser is seeing the closing double-quote in the src (v=4111">) and terminating the js string for document.write, even though the js string isn't intended to be closed until after the </script> tag. The parser then sees that </script> tag as the closing tag for the *parent* <script> tag, which leaves it to interpret the rest of the contents of the parent <script> tag as literal text, which is why you see it.
I don't know how one is supposed to properly escape the quotes to do that kind of tag construction, but apparently the HTML5 parser magically knows how to handle the bad construction.
The error that gets shown is: JavaScript Error: "unterminated string literal"
Oh, what's happening is that the parser is seeing the closing double-quote in the src (v=4111">) and terminating the js string for document.write, even though the js string isn't intended to be closed until after the </script> tag. The parser then sees that </script> tag as the closing tag for the *parent* <script> tag, which leaves it to interpret the rest of the contents of the parent <script> tag as literal text, which is why you see it.
I don't know how one is supposed to properly escape the quotes to do that kind of tag construction, but apparently the HTML5 parser magically knows how to handle the bad construction.
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQ Search the Forum Camino. Help Troubleshoot Camino
Snow7's Camino Forum FAQ Search the Forum Camino. Help Troubleshoot Camino
-
- Posts: 2777
- Joined: November 7th, 2002, 1:00 am
- Location: Japan
- Contact:
Re: I'm seeing HTML coding
I think this is a long standing Gecko bug that was fixed as a side effect of the html5 parser (or fixed in the Firefox 4.0 / Gecko 2.0 timeframe for other reasons). That part of the html source validates correctly for the given doctype.
Uncle Asad's analysis is basically right as to what is happening.
Uncle Asad's analysis is basically right as to what is happening.