Revision: 1239
http://jtidy.svn.sourceforge.net/jtidy/?rev=1239&view=rev
Author: fgiust
Date: 2010-11-28 21:57:44 +0000 (Sun, 28 Nov 2010)
Log Message:
-----------
fix NPE for script tags without a "type" attribute
Modified Paths:
--------------
branches/CodeUpdateAndJava5/src/main/java/org/w3c/tidy/TagCheckImpl.java
Modified: branches/CodeUpdateAndJava5/src/main/java/org/w3c/tidy/TagCheckImpl.java
===================================================================
--- branches/CodeUpdateAndJava5/src/main/java/org/w3c/tidy/TagCheckImpl.java 2010-11-26 04:19:25 UTC (rev 1238)
+++ branches/CodeUpdateAndJava5/src/main/java/org/w3c/tidy/TagCheckImpl.java 2010-11-28 21:57:44 UTC (rev 1239)
@@ -181,7 +181,7 @@
if (lang != null)
{
String str = lang.value;
- if (str.regionMatches(true, 0, "javascript", 0, 10) ||
+ if (str == null || str.regionMatches(true, 0, "javascript", 0, 10) ||
str.regionMatches(true, 0, "jscript", 0, 7)) {
node.addAttribute("type", "text/javascript");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|