jp (blog/preview): xhtml cleaning is now used on preview

This commit is contained in:
Goffi 2016-03-05 15:43:14 +01:00
commit d34f3ab948

View file

@ -343,7 +343,9 @@ class Preview(base.CommandBase, BlogCommon):
if syntax != 'XHTML': if syntax != 'XHTML':
with open(current_file_path, 'rb') as f: with open(current_file_path, 'rb') as f:
content_xhtml = self.host.bridge.syntaxConvert(f.read(), syntax, 'XHTML', False, self.profile) # we use safe=True because we want to have a preview as close as possible to what the
# people will see
content_xhtml = self.host.bridge.syntaxConvert(f.read(), syntax, 'XHTML', True, self.profile)
# at this point the syntax is converted, we can display the preview # at this point the syntax is converted, we can display the preview