Skip to content

Commit

Permalink
Test fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
xurble committed Jan 15, 2024
1 parent d385c98 commit be80b09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions feeds/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ def test_sanitize_attrs(self, mock):

body = src.posts.all()[0].body

import pdb; pdb.set_trace()

self.assertTrue("<img" in body)
self.assertFalse("align=" in body)
self.assertFalse("hspace=" in body)
Expand Down
4 changes: 4 additions & 0 deletions feeds/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ def parse_feed_xml(source_feed, feed_content, output):

# we are going to take the longest
body = ""
if hasattr(e, "content"):
for c in e.content:
if len(c.value) > len(body):
body = c.value

if hasattr(e, "summary"):
if len(e.summary) > len(body):
Expand Down

0 comments on commit be80b09

Please sign in to comment.