Bug 107430 - comment parsing causes script to be displayed as text
Summary: comment parsing causes script to be displayed as text
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 00:48 UTC by George Staikos
Modified: 2012-05-25 20:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (418 bytes, text/html)
2005-06-15 00:48 UTC, George Staikos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Staikos 2005-06-15 00:48:10 UTC
See testcase.  This testcase is almost completely minimal.  The script doesn't 
get evaluated, and the text of it is rendered on the screen.  This was reduced 
from a live page.
Comment 1 George Staikos 2005-06-15 00:48:42 UTC
Created attachment 11456 [details]
testcase
Comment 2 George Staikos 2005-06-15 00:54:59 UTC
Seems the /html and /body are irrelevant.
Comment 3 Ivor Hewitt 2005-06-15 14:38:37 UTC
Hi, what is the expected parsing of this page in strict mode?
The problem is the page gets handled in strict mode because of the <!DOCTYPE statement.
Removing that and running in quirks mode the page works, but in strict mode the comment is treated as closed and so the text gets displayed.
Comment 4 George Staikos 2005-06-15 14:42:48 UTC
Well I would not expect it to dump the js on the page, that's for sure.  I think because the DTD is transitional it should probably still run the script.  This was taken from a live page, and no other browser renders the script text.  
Comment 5 FiNeX 2008-04-07 00:33:02 UTC
I've just tried the testcase on konqueror 4.0.3. It display an alert message and it render some text on the page. Is this the right behavior?
Comment 6 Martin Fitzpatrick 2008-04-07 03:19:14 UTC
Current behaviour in KDE4.0.3/Kubuntu is correct: I think the bug is that it previously displayed the contents of the Javascript/comment because of malformed comment. Now seems fixed.
Comment 7 Andrea Iacovitti 2012-05-25 20:59:45 UTC
Seems fixed (kde 4.8)