Re: [Htmlparser-user] HTML parser parsing script incorrectly
Brought to you by:
derrickoswald
From: Derrick O. <der...@gm...> - 2010-07-08 04:38:36
|
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 <nik...@ex...>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;\"> | <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> | <a class=\"underlineless\" > rel=\"nofollow\" href=\"/registration.jsp\">Join Now</a> </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 > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > |