From: <mgu...@us...> - 2009-02-03 14:27:45
|
Revision: 219 http://nekohtml.svn.sourceforge.net/nekohtml/?rev=219&view=rev Author: mguillem Date: 2009-02-03 14:27:42 +0000 (Tue, 03 Feb 2009) Log Message: ----------- fix incorrect HTMLEventInfo augmentations for script content (patch provided by Louis Ryan) Issue #2236681 Modified Paths: -------------- trunk/doc/changes.html trunk/src/org/cyberneko/html/HTMLScanner.java Added Paths: ----------- trunk/data/canonical/test-augmentations-script-content.html trunk/data/test-augmentations-script-content.html trunk/data/test-augmentations-script-content.html.settings Added: trunk/data/canonical/test-augmentations-script-content.html =================================================================== --- trunk/data/canonical/test-augmentations-script-content.html (rev 0) +++ trunk/data/canonical/test-augmentations-script-content.html 2009-02-03 14:27:42 UTC (rev 219) @@ -0,0 +1,10 @@ +[synth](HTML +[1,1,0;1,7,6](BODY +[1,7,6;1,15,14](SCRIPT +[1,15,14;3,1,27]"\ndoSomething\n +[3,1,27;3,10,36])SCRIPT +[3,10,36;3,18,44](SCRIPT +[3,18,44;5,1,61]"\ndoSomethingElse\n +[5,1,61;5,10,70])SCRIPT +[synth])BODY +[synth])HTML Property changes on: trunk/data/canonical/test-augmentations-script-content.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/data/test-augmentations-script-content.html =================================================================== --- trunk/data/test-augmentations-script-content.html (rev 0) +++ trunk/data/test-augmentations-script-content.html 2009-02-03 14:27:42 UTC (rev 219) @@ -0,0 +1,5 @@ +<body><script> +doSomething +</script><script> +doSomethingElse +</script></body> \ No newline at end of file Property changes on: trunk/data/test-augmentations-script-content.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/data/test-augmentations-script-content.html.settings =================================================================== --- trunk/data/test-augmentations-script-content.html.settings (rev 0) +++ trunk/data/test-augmentations-script-content.html.settings 2009-02-03 14:27:42 UTC (rev 219) @@ -0,0 +1 @@ +feature http://cyberneko.org/html/features/augmentations true Modified: trunk/doc/changes.html =================================================================== --- trunk/doc/changes.html 2009-02-03 14:03:52 UTC (rev 218) +++ trunk/doc/changes.html 2009-02-03 14:27:42 UTC (rev 219) @@ -28,7 +28,9 @@ <dd>fixed NPE when parsing from a Character stream (patch provided by Ludger Bünger, #2503982), when closing comment --> is missing, comment ends with > (patch provided by Tatsuhiko Miyabe, #2552096), don't treat tags with non-HTML namespace like HTML tags (patch provided by Tatsuhiko Miyabe, #2551958), - force creation of BODY rather than of HEAD for unknown tags + force creation of BODY rather than of HEAD for unknown tags, + fix incorrect HTMLEventInfo augmentations for script content (patch provided by Louis Ryan, #2236681) + <dt>Version 1.9.11 (29 Dec 2008) [<a href='http://downloads.sourceforge.net/nekohtml/nekohtml-1.9.11.zip'>zip</a>] Modified: trunk/src/org/cyberneko/html/HTMLScanner.java =================================================================== --- trunk/src/org/cyberneko/html/HTMLScanner.java 2009-02-03 14:03:52 UTC (rev 218) +++ trunk/src/org/cyberneko/html/HTMLScanner.java 2009-02-03 14:27:42 UTC (rev 219) @@ -2010,6 +2010,9 @@ fElementCount++; fSingleBoolean[0] = false; final String ename = scanStartElement(fSingleBoolean); + fBeginLineNumber = fCurrentEntity.lineNumber; + fBeginColumnNumber = fCurrentEntity.columnNumber; + fBeginCharacterOffset = fCurrentEntity.characterOffset; if ("script".equalsIgnoreCase(ename)) { scanScriptContent(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |