Skip to content

Commit

Permalink
Don't sanitize by default in restricted mode, because html5lib isn't …
Browse files Browse the repository at this point in the history
…guaranteed to be available.
  • Loading branch information
kurtraschke committed Jul 28, 2010
1 parent 2346131 commit c70ca23
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions textile/textilefactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TextileFactory(object):
>>> f = TextileFactory(restricted=True)
>>> f.process("more text here")
u'\\t<p>more text here</p>'
'\\t<p>more text here</p>'
Certain parameter values are not permitted because they are illogical:
Expand All @@ -34,7 +34,7 @@ class TextileFactory(object):
"""

def __init__(self, restricted=False, lite=False, sanitize=None,
def __init__(self, restricted=False, lite=False, sanitize=False,
noimage=None, auto_link=False, get_sizes=False,
head_offset=0, html_type='xhtml'):

Expand All @@ -55,12 +55,6 @@ def __init__(self, restricted=False, lite=False, sanitize=None,
else:
noimage = False

if sanitize is None:
if restricted:
sanitize = True
else:
sanitize = False

self.class_parms['noimage'] = noimage
self.method_parms['sanitize'] = sanitize
self.class_parms['auto_link'] = auto_link
Expand Down

0 comments on commit c70ca23

Please sign in to comment.