Commit b1f078a0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Ivan Tyagov

modify safe_html.py patch for our fork of PortalTransforms.

use HTMLParser instead of SGMLParser (cf. 0952bee6).
parent dfe01151
import re import re
from sgmllib import SGMLParser, SGMLParseError from HTMLParser import HTMLParser, HTMLParseError
from Products.CMFDefault.utils import IllegalHTML from Products.CMFDefault.utils import IllegalHTML
from Products.PortalTransforms.transforms import safe_html from Products.PortalTransforms.transforms import safe_html
...@@ -56,8 +56,8 @@ def parse_declaration(self, i): ...@@ -56,8 +56,8 @@ def parse_declaration(self, i):
j = k+3 j = k+3
else: else:
try: try:
j = SGMLParser.parse_declaration(self, i) j = HTMLParser.parse_declaration(self, i)
except SGMLParseError: except HTMLParseError:
j = len(self.rawdata) j = len(self.rawdata)
return j return j
safe_html.StrippingParser.parse_declaration = parse_declaration 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