htmlmin icon indicating copy to clipboard operation
htmlmin copied to clipboard

Parsing error with string: H&M

Open nberney opened this issue 12 years ago • 3 comments

Generates an error with the following string:

import htmlmin htmlmin.minify('H&M')

Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/htmlmin/main.py", line 93, in minify minifier.close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 118, in close self.goahead(1) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 213, in goahead self.error("EOF in middle of entity or char ref") File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 121, in error raise HTMLParseError(message, self.getpos()) HTMLParseError: EOF in middle of entity or char ref, at line 1, column 2

nberney avatar Dec 04 '13 18:12 nberney

Interesting. I will have to think on this. Technically, that is invalid HTML. It should be 'H&M'. That is what the error is about.

mankyd avatar Dec 04 '13 18:12 mankyd

Hi Dave, Thanks.

I know it's invalid... But I have a text with a lot a H&M (www.hm.com) references...

Cheers, Nicolas

dave mankoff mailto:[email protected] December 4, 2013 19:31

Interesting. I will have to think on this. Technically, that is invalid HTML. It should be 'H&M'. That is what the error is about.

— Reply to this email directly or view it on GitHub https://github.com/mankyd/htmlmin/issues/4#issuecomment-29831289.

nberney avatar Dec 05 '13 16:12 nberney

Is this issue resolved ? I am facing same issue .

tnsurender avatar Nov 02 '18 14:11 tnsurender