Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML tags inside scripts cause breakage #5

Open
seanlavelle opened this issue Jan 4, 2013 · 0 comments
Open

HTML tags inside scripts cause breakage #5

seanlavelle opened this issue Jan 4, 2013 · 0 comments

Comments

@seanlavelle
Copy link

If you try to use yahp on an html document that looks like this:

<html>
<script>
var foo = "</foo>"
</script>
</html>

then it fails with a null pointer exception. It's because jtidy fails on those documents and yahp tries to use the original html, but its tidiness assumptions get violated.
See this jtidy bug report: http://sourceforge.net/p/jtidy/discussion/41437/thread/408cffe8/

Right now yahp is stripping out <script> elements, but it does it after passing the html through jtidy. I think a reasonable workaround would be to strip out the scripts before calling jtidy, so jtidy won't fail. I am working on coding this fix.

Is this project still active enough for a pull request that fixes this to get merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant