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

HTMLParser has problems with html in script variables... #1

Open
jedie opened this issue Jul 12, 2011 · 3 comments
Open

HTMLParser has problems with html in script variables... #1

jedie opened this issue Jul 12, 2011 · 3 comments

Comments

@jedie
Copy link

jedie commented Jul 12, 2011

Response's content is no valid html: 'Unexpected end tag `p`

e.g.:

<script>
var js_sha_link='<p>***</p>';
</script>

or e.g.:

$("#preview_id_content div").html('<h2 class="noanchor">loading...</h2>');
@jedie
Copy link
Author

jedie commented Jul 12, 2011

This is also not valid?

AssertionError: html code is not valid: Unexpected end tag `input` (Line 1, Column 49), at line 1, column 50 - code: '<input value="Foo" type="text" name="first_name"></input>'

Should i open a seperate issuse?

@jedie
Copy link
Author

jedie commented Sep 7, 2011

This problem has other guys, too: django-compressor/django-compressor#60 ;)

The real problem is here: http://bugs.python.org/issue670664 and has pachtes...

@jedie
Copy link
Author

jedie commented Sep 7, 2011

I tried http://bugs.python.org/file22767/hp_fix.diff from http://bugs.python.org/issue670664 and this seems to fix this issues!

I add the patch in my django-tools with: jedie/django-tools@aa722b3

gregmuellegger added a commit that referenced this issue Jan 27, 2012
…with obscure (not correctly escaped) html content.
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