goodcui / owaspantisamy

Automatically exported from code.google.com/p/owaspantisamy
0 stars 0 forks source link

<SCRIPT></SCRIPT><p>a</p> breaks #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. CleanResults cr = as.scan("<SCRIPT></SCRIPT><p>a</p>", policy);
2.
3.

What is the expected output? What do you see instead?
<p>a</p>

What version of the product are you using? On what operating system?
1.4.3

Please provide any additional information below.

Exception in thread "main" java.lang.StackOverflowError
    at java.lang.String.equalsIgnoreCase(String.java:1119)
    at org.cyberneko.html.HTMLElements.getElement(HTMLElements.java:533)
    at org.cyberneko.html.HTMLElements.getElement(HTMLElements.java:512)
    at org.cyberneko.html.HTMLTagBalancer.getElement(HTMLTagBalancer.java:1119)
    at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:559)
    at org.cyberneko.html.HTMLTagBalancer.forceStartElement(HTMLTagBalancer.java:758)
    at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:637)
    at org.cyberneko.html.HTMLTagBalancer.forceStartElement(HTMLTagBalancer.java:758)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:999)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1000)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1000)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1000)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1000)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1000)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1000)

Note however:
CleanResults cr = as.scan("<HTML><SCRIPT></SCRIPT><p>a</p></HTML>", policy); is 
fine

Original issue reported on code.google.com by q8e192@gmail.com on 21 Jan 2011 at 12:06

GoogleCodeExporter commented 9 years ago
Weird, but it appears to be a bug in NekoHTML from the stack trace. I'll mark 
as "WontFix", and please report the bug to NekoHTML who seem to be more active 
in development these days.

Original comment by arshan.d...@gmail.com on 3 Feb 2011 at 7:52