Merge remote-tracking branch 'gitorious/master'
This commit is contained in:
commit
4e5a55787b
@ -40,7 +40,8 @@ class MediaEntryMigration(DocumentMigration):
|
|||||||
Now that we can have rich descriptions via Markdown, we should
|
Now that we can have rich descriptions via Markdown, we should
|
||||||
update all existing entries to record the rich description versions.
|
update all existing entries to record the rich description versions.
|
||||||
"""
|
"""
|
||||||
self.target = {'description_html': {'$exists': False}}
|
self.target = {'description_html': {'$exists': False},
|
||||||
|
'description': {'$exists': True}}
|
||||||
|
|
||||||
if not self.status:
|
if not self.status:
|
||||||
for doc in self.collection.find(self.target):
|
for doc in self.collection.find(self.target):
|
||||||
|
@ -383,6 +383,11 @@ def cleaned_markdown_conversion(text):
|
|||||||
"""
|
"""
|
||||||
Take a block of text, run it through MarkDown, and clean its HTML.
|
Take a block of text, run it through MarkDown, and clean its HTML.
|
||||||
"""
|
"""
|
||||||
|
# Markdown will do nothing with and clean_html can do nothing with
|
||||||
|
# an empty string :)
|
||||||
|
if not text:
|
||||||
|
return u''
|
||||||
|
|
||||||
return clean_html(MARKDOWN_INSTANCE.convert(text))
|
return clean_html(MARKDOWN_INSTANCE.convert(text))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user