Mercurial > libervia-backend
changeset 1881:386d61abfac2
jp (blog/preview): xhtml cleaning is now used on preview
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 05 Mar 2016 15:43:14 +0100 |
parents | 68944e270c40 |
children | ed444e9aa078 |
files | frontends/src/jp/cmd_blog.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_blog.py Sat Mar 05 13:17:29 2016 +0100 +++ b/frontends/src/jp/cmd_blog.py Sat Mar 05 15:43:14 2016 +0100 @@ -343,7 +343,9 @@ if syntax != 'XHTML': 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