Re: HTML parser parsing script incorrectly

Derrick Oswald <[email protected]>
Newsgroups gmane.comp.parsers.htmlparser.user
Message-ID <[email protected]>
Did you set STRICT false:

http://htmlparser.sourceforge.net/javadoc/org/htmlparser/scanners/ScriptScanner.html



On Wed, Jul 7, 2010 at 9:48 PM, Niket Arora <[email protected]>wrote:

>  I m parsing a page
> http://www.healthline.com/search?q1=how+to+improve+prostate+blood+levels using
> htmlparser api and I m getting content inside a script tag in some other tag
> and reason for this is html tags are present in a string inside javascript
> tags and are not escaped …. so htmlparser api is closing on those tags.
>
>
>
>
>
>
> ================================================================================================================================================================================================
>
>
>
> <div id="myHealthlineHeader">
>
>         <script>
>
>               if(isLoggedIn()) {
>
>                 document.write("<a href=\"/action/LogOutServlet\">Sign
> Off</a> | <a rel=\"nofollow\" href=\"/myhealthline/account_overview.jsp\">My
> Healthline</a> | Welcome, <strong>" + getNickname() + "</strong>");
>
>                 document.getElementById("myHealthlineHeader").className =
> "hl_state_top_signed_in";
>
>               } else {
>
>
>
>                 document.write("<div
> style=\"float:right;text-align:right;padding:0 5px 0
> 0;\">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a class=\"underlineless\"
> rel=\"nofollow\"
> href=\"/yourfeedback.jsp?url=%2Fsearch%3Fq1%3Dhow%2Bto%2Bimprove%2Bprostate%2Bblood%2Blevels\">Feedback</a></div>");
>
>                 document.write("<div style=\"float:right\"><a
> class=\"underlineless\" rel=\"nofollow\" href=\"/signin.jsp\">Sign
> in</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a class=\"underlineless\"
> rel=\"nofollow\" href=\"/registration.jsp\">Join Now</a>&nbsp;</div>")
>
>                 document.getElementById("myHealthlineHeader").className =
> "hl_state_top";
>
>               }
>
>         </script>
>
> </div>
>
>
>
>
> ================================================================================================================================================================================================
>
>
>
> Is there anyway to fix this issue?
>
>
>
> Regards
>
> Niket
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Htmlparser-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/htmlparser-user
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

_______________________________________________
Htmlparser-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlparser-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.