jp (blog/edit): fixed handling of XHTML content when it is not already wrapped in <div>…</div>
This commit is contained in:
parent
d4efb6dad1
commit
db06965385
1 changed files with 3 additions and 0 deletions
|
|
@ -570,6 +570,9 @@ class Edit(base.CommandBase, BlogPublishCommon, common.BaseEdit):
|
|||
content, SYNTAX_XHTML, self.current_syntax, False, self.profile
|
||||
)
|
||||
if content and self.current_syntax == SYNTAX_XHTML:
|
||||
content = content.strip()
|
||||
if not content.startswith('<div>'):
|
||||
content = u'<div>' + content + u'</div>'
|
||||
try:
|
||||
from lxml import etree
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue