Closed
Bug 81211
Opened 24 years ago
Closed 23 years ago
pes.internet.cz - Javascript code in part rendered on the page
Categories
(Tech Evangelism Graveyard :: Czech, defect, P4)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: lizal, Assigned: pali)
References
()
Details
(Keywords: testcase, Whiteboard: CentralEurope)
Attachments
(2 files)
Moz 0.9/build 2001050515, WinNt4/Sp6
Visit, for example, http://pes.internet.cz
Later on the page you can see rendered text - which is actually part of the
Javascript source code and should not be seen:
\n'); //-->
and later is present:
\n'); document.write('\n'); document.write(''); document.write(''); //-->
Without the Javascript support turned on, you can see it as well, but the page
looks somehow differently (layout differ slightly in the problematic area).
Due to this error the page has a partly broken layout. Just compare the result
with Netscape4.75. Also, when copying part of the "script" text, Moz. selects
more that is actually marked as "selected".
Expected outcome:
Render the page as older Netscape.
I forgot, (for the non-czech speakers, I bet 99.9% of the Moz team), you can
search for "//--" (without the "") to find the exact place on the page (i.e.,
you can search for this fragment of a script, which should not be possible under
normal circumstances).
Comment 2•24 years ago
|
||
Reporter,
If this is your page, find all cases of </script> or, as is written in the
source in one particular document.write in that page, </SCR'+'IPT> and change
it to <\/script> or <\/scr'+'ipt>
Look, for instance, on this line:
var ht = '<SCRIPT LANGUAGE="JavaScript1.1"
SRC=\"http://reklama.internet.cz/rich/place.php3?
spot='+bnr+'&ran='+ran+'\">\n</SCR'+'IPT>';
change that to:
var ht = '<SCRIPT LANGUAGE="JavaScript1.1"
SRC=\"http://reklama.internet.cz/rich/place.php3?
spot='+bnr+'&ran='+ran+'\">\n<\/SCR'+'IPT>';
What is happening is that the javascript interpereter is seeing a </script> tag
and interpereting it immediately. If you escape the forward slash, then the
javascript interpereter views it as just part of the string.
I think this bug is probably Evangelism. Am I right? Anyone?
jake
Comment 3•24 years ago
|
||
forgot to cc myself...
jake
Unfortunately, this is not my page... I do not mind this bug much, but I do not
recall this problem/feature in previous milestones. Maybe the page design has
changed as well. My point was just the difference from Netscape (and IE as well).
Comment 5•24 years ago
|
||
I saw this in builds from long ago right up to the present and, I don't think
it is a bug, really. It is another case where Microsoft and Netscape gloss
over common developer mistakes and just interperet it as they think the
developer "really meant it to work". It is just plainly improper javascript
code however common the mistake is. Just think how bloated Mozilla would be if
it took care of all common mistakes. That is a lot of code forks...and that is
one of the reasons for the bloat of IE and Netscape 4.xx.
I'll create a simplified testcase to see if this is truly the problem here...
Jake
Comment 6•24 years ago
|
||
Hmmmm?????
Forget what I said about the problem with escaping <\/script> tags...however,
you should still do it anyway. Mozilla seems to deal with that just fine these
days.
I'm attaching an html file with the two offending pieces of code. However, as
you will see, they work fine in the testcase, whereas in said link, they render
parts of the javascript code. I really can't see why???
testcase coming up....
Jake
Comment 7•24 years ago
|
||
Comment 8•24 years ago
|
||
Jake, you didn't say doctype in your testcase, so Mozilla's quirks mode mimics
ns4 behavior. Adding <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN"> to
the top as on the site, displays the //-->
Comment 9•24 years ago
|
||
Ok, I figure it goes like this:
<!-- SCRIPT LANGUAGE="JavaScript"> propably isn't *really* a start tag for
script. Never seen it done like that before anyways... lucky me?
So... the stuff after it from <!-- to document.write ('<a href=\"'+cli+'\"
target="_top"> is a html comment tag;
<img src=\"'+img+'\" border=0> is a messed up image tag, </a> is the end
of an A that isn't there, then \n'); //--> remains.
Don't know why the other script displays differently though.
Comment 10•24 years ago
|
||
Comment 11•24 years ago
|
||
Verified on:
build: 2001-05-21-11-Mtrunk
platform: WinNT
In the test case attached, I see the JS source code. Marking it as 'New'.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: harishd → bclary
Component: Parser → Evangelism
QA Contact: bsharma → zach
Comment 12•24 years ago
|
||
As hoju pointed out the SCRIPT is not really a script it's a COMMENT!!!! I'm
inclined to mark this WONTFIX...but will pass the buck to evang. to see if it's
worth evangelizing.
Updated•23 years ago
|
Priority: -- → P4
Updated•23 years ago
|
Component: Evangelism → European
Product: Browser → Tech Evangelism
Version: other → unspecified
Updated•23 years ago
|
Whiteboard: CentralEurope
Comment 14•23 years ago
|
||
-> CentralEurope
Assignee: nitot → piskozub
Component: European → Central Europe
QA Contact: momoi → pali
Assignee | ||
Comment 15•23 years ago
|
||
contacted site owner with description of a problem and possible solutions.
Comment 16•23 years ago
|
||
Assigning to Pavol as took care of this bug anyway.
Assignee: piskozub → pali
Summary: Javascript code in part rendered on the page → pes.internet.cz - Javascript code in part rendered on the page
Assignee | ||
Comment 17•23 years ago
|
||
invalid comment on page was corrected. marking fixed.
--mondo
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•