mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Don't mangle stories with code when updating, just use new story. Thanks Bruno!
This commit is contained in:
parent
5650389bb6
commit
021fe32d9f
1 changed files with 5 additions and 1 deletions
|
@ -1030,7 +1030,11 @@ class Feed(models.Model):
|
|||
original_content = zlib.decompress(existing_story.story_content_z)
|
||||
# print 'Type: %s %s' % (type(original_content), type(story_content))
|
||||
if story_content and len(story_content) > 10:
|
||||
story_content_diff = htmldiff(unicode(original_content), unicode(story_content))
|
||||
if "<code" in story_content:
|
||||
# Don't mangle stories with code, just use new
|
||||
story_content_diff = story_content
|
||||
else:
|
||||
story_content_diff = htmldiff(unicode(original_content), unicode(story_content))
|
||||
else:
|
||||
story_content_diff = original_content
|
||||
# logging.debug("\t\tDiff: %s %s %s" % diff.getStats())
|
||||
|
|
Loading…
Add table
Reference in a new issue