Revision: 234
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=234&view=rev
Author: matthiasmiller
Date: 2008-08-28 16:24:36 +0000 (Thu, 28 Aug 2008)
Log Message:
-----------
handle IE conditional comments
Modified Paths:
--------------
trunk/pyjsl/htmlparse.py
Modified: trunk/pyjsl/htmlparse.py
===================================================================
--- trunk/pyjsl/htmlparse.py 2008-08-28 14:27:08 UTC (rev 233)
+++ trunk/pyjsl/htmlparse.py 2008-08-28 16:24:36 UTC (rev 234)
@@ -41,6 +41,10 @@
self._node_positions = jsparse.NodePositions(self.rawdata + data)
HTMLParser.HTMLParser.feed(self, data)
+ def unknown_decl(self, data):
+ # Ignore unknown declarations instead of raising an exception.
+ pass
+
def getscripts(self):
return self._scripts
@@ -77,4 +81,9 @@
"",
"<!--\nvar s = '<script></script>';\n-->"
])
-
+ def testConditionalComments(self):
+ html = """
+<!--[if IE]>This is Internet Explorer.<![endif]-->
+<![if !IE]>This is not Internet Explorer<![endif]>
+"""
+ findscripts(html)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|