summaryrefslogtreecommitdiff
path: root/app/lib
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-02-18 20:52:15 -0500
committerluxagraf <sng@luxagraf.net>2016-02-18 20:52:15 -0500
commit9bfc517f50147bde175a06e80291f102b0c65a21 (patch)
tree3d0fde25699e3758cb8358a4ef3f6b7c3454506b /app/lib
parent38c9ec961457b7dbd9f3396779d324dd85548265 (diff)
finally got parser right
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/templatetags/templatetags/amp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/templatetags/templatetags/amp.py b/app/lib/templatetags/templatetags/amp.py
index b20c9a9..d539de7 100644
--- a/app/lib/templatetags/templatetags/amp.py
+++ b/app/lib/templatetags/templatetags/amp.py
@@ -29,8 +29,8 @@ def remove_img_tags(text):
except:
new_tag = soup.new_tag("amp-img", alt=img["alt"], width=width, height=height, src=img['src'])
img.replace_with(new_tag)
- soup = soup.body.next
- return soup.prettify()
+ soup = soup.body.encode_contents()
+ return soup
def do_amp(text):