Commit 8c4427ab authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

modify safe_html.py patch for our fork of PortalTransforms.

use HTMLParser instead of SGMLParser (cf. 0952bee6).
parent 19e11996
import re
from sgmllib import SGMLParser, SGMLParseError
from HTMLParser import HTMLParser, HTMLParseError
from Products.CMFDefault.utils import IllegalHTML
from Products.PortalTransforms.transforms import safe_html
......@@ -56,8 +56,8 @@ def parse_declaration(self, i):
j = k+3
else:
try:
j = SGMLParser.parse_declaration(self, i)
except SGMLParseError:
j = HTMLParser.parse_declaration(self, i)
except HTMLParseError:
j = len(self.rawdata)
return j
safe_html.StrippingParser.parse_declaration = parse_declaration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment