⇤ ← Revision 1 as of 2017-04-19 14:26:06
Size: 789
Comment:
|
← Revision 2 as of 2017-04-19 14:28:01 ⇥
Size: 804
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
You need to modify the html.py in Mezzanine. | You need to modify the html.py in Mezzanine. |
Line 7: | Line 7: |
{{{ | |
Line 13: | Line 14: |
}}} | |
Line 16: | Line 17: |
{{{ | |
Line 27: | Line 29: |
}}} |
You need to modify the html.py in Mezzanine.
Modify lib/python3.5/site-packages/mezzanine/utils/html.py
Before:
try: from html.parser import HTMLParser, HTMLParseError from html.entities import name2codepoint except ImportError: # Python 2 from HTMLParser import HTMLParser, HTMLParseError from htmlentitydefs import name2codepoint
After:
try: from html.parser import HTMLParser from html.entities import name2codepoint try: from html.parser import HTMLParseError except ImportError: # Python 3.5+ class HTMLParseError(Exception): pass except ImportError: # Python 2 from HTMLParser import HTMLParser, HTMLParseError from htmlentitydefs import name2codepoint