Bug 30396 - konqueror: incorrectly ignores javascript inside HTML comments <!--- -->
Summary: konqueror: incorrectly ignores javascript inside HTML comments <!--- -->
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-08-08 08:03 UTC by ivan-kde
Modified: 2002-09-16 14:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan-kde 2001-08-08 07:53:19 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kjs
Version:           KDE 2.1.2 
Severity:          normal
Installed from:    Debian Packages
Compiler:          gcc version 2.95.4 20010721 (Debian prerelease)
OS:                Linux
OS/Compiler notes: Not Specified

Konqueror incorrectly ignores javascript inside HTML comments.

For example:

<SCRIPT><!---
function svcdb_change (svcdb) {
  alert("rawr!!!");
}
--></SCRIPT>

does not work but:

<SCRIPT>
function svcdb_change (svcdb) {
  alert("rawr!!!");
}
</SCRIPT>

works fine.

The first snippet above works in IE Netscape and Mozilla.  Since enclosing
JavaScript in HTML comment tags is very common and suggested by many
tutorials/books/etc (to "hide the script from old browsers") I suggest that
Konqueror should ignore HTML comments inside <SCRIPT> tags.

If you need any additional information please don't hesitate to contact me.

For cross-reference this is debian
bug #100386



(Submitted via bugs.kde.org)
Comment 1 Harri Porten 2001-08-09 19:53:04 UTC
> Konqueror incorrectly ignores javascript inside HTML comments.
> 
> For example:
> 
> <SCRIPT><!---
> function svcdb_change (svcdb) {
>   alert("rawr!!!");
> }
> --></SCRIPT>

Works fine with KDE 2.2.

Harri.