Skip to content

Commit

Permalink
Merge pull request #185 from codeEmpress1/fix-image-parsing
Browse files Browse the repository at this point in the history
fix issue with image parsing
  • Loading branch information
codeEmpress1 authored Jan 16, 2024
2 parents 8a4c251 + 5fdeb2d commit 505415c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions canonicalwebteam/discourse/parsers/base_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,6 @@ def _replace_image_src(self, soup):
Given some HTML soup, replace relative image srcs
"""
for img in soup.findAll("img"):
src = img.get("src", "")
if src and src.startswith("/"):
img["src"] = f"{self.api.base_url}{src}"
if img.get("srcset", None):
del img["srcset"]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="canonicalwebteam.discourse",
version="5.4.7",
version="5.4.8",
author="Canonical webteam",
author_email="webteam@canonical.com",
url="https://github.com/canonical/canonicalwebteam.discourse",
Expand Down

0 comments on commit 505415c

Please sign in to comment.