Version: (using KDE KDE 3.3.2) Installed from: Debian testing/unstable Packages OS: Linux If a script is loaded from an external file, as follows: <script type="text/vbscript" lang="vbscript" src="test.vbs"></script> then Konqueror loads it an tries executing it as *Javascript* even if both type and lang say that it is a *vbscript*. This causes the bug icon to appear on the status bar. Inline scripts are handled correctly: <script type="text/vbscript" lang="vbscript"> ' This is vbscript, and should never be parsed by Konqueror. This is ' handled correctly. </script> I have put a test case at http://thenew.unitedvisions.tv/~aisotton/kst/ I might change that page, so here's the test case inline (two files, test.html and test.vbs): -- test.html -- <html> <head> <title>Konqueror Script Test</title> <script type="text/vbscript" lang="vbscript"> ' This is vbscript, and should never be parsed by Konqueror. This is ' handled correctly. </script> <script type="text/vbscript" lang="vbscript" src="test.vbs"></script> </head> <body> <h1>Konqueror Script Test</h1> </body> </html> -- EOF -- -- test.vbs -- ' This is vbscript and should never be parsed by Konqueror. ' This is NOT handled correctly -- EOF --
Confirmed for HEAD 20050128
I have experienced this same bug on http://www.intocablesdelivery.com.ar/
SVN commit 589296 by orlovich: Don't try to run external VBScript as ECMAScript (98216) Add a couple of symmetric mimetypes (134763) BUG:134763 BUG:98216 M +3 -1 htmltokenizer.cpp --- branches/KDE/3.5/kdelibs/khtml/html/htmltokenizer.cpp #589295:589296 @@ -395,7 +395,7 @@ CachedScript* cs = 0; // forget what we just got, load from src url instead - if ( !currentScriptSrc.isEmpty() && + if ( !currentScriptSrc.isEmpty() && javascript && (cs = parser->doc()->docLoader()->requestScript(currentScriptSrc, scriptSrcCharset) )) { cachedScript.enqueue(cs); } @@ -1153,6 +1153,8 @@ type.compare("text/ecmascript") != 0 && type.compare("text/livescript") != 0 && type.compare("application/x-javascript") != 0 && + type.compare("application/x-ecmascript") != 0 && + type.compare("application/javascript") != 0 && type.compare("application/ecmascript") != 0 ) javascript = false; } else if( a ) {