Mercurial > libervia-backend
comparison frontends/src/jp/cmd_blog.py @ 2331:01877048c94a
jp (blog/edit): avoid call to syntaxConvert if syntax is already XHTML
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 13 Jul 2017 22:49:37 +0200 |
parents | 74c1dbabeec8 |
children | 2c2b826b0bb3 |
comparison
equal
deleted
inserted
replaced
2330:74c1dbabeec8 | 2331:01877048c94a |
---|---|
365 | 365 |
366 def publish(self, content, mb_data): | 366 def publish(self, content, mb_data): |
367 if self.args.syntax is None: | 367 if self.args.syntax is None: |
368 # default syntax has been used | 368 # default syntax has been used |
369 mb_data['content_rich'] = content | 369 mb_data['content_rich'] = content |
370 elif self.current_syntax == SYNTAX_XHTML: | |
371 mb_data['content_xhtml'] = content | |
370 else: | 372 else: |
371 mb_data['content_xhtml'] = self.host.bridge.syntaxConvert(content, self.current_syntax, SYNTAX_XHTML, False, self.profile) | 373 mb_data['content_xhtml'] = self.host.bridge.syntaxConvert(content, self.current_syntax, SYNTAX_XHTML, False, self.profile) |
372 | 374 |
373 if self.pubsub_item is not None: | 375 if self.pubsub_item is not None: |
374 mb_data['id'] = self.pubsub_item | 376 mb_data['id'] = self.pubsub_item |