Fix markdown bug
This commit is contained in:
parent
139cb93811
commit
924f209311
1 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,8 @@ def markdown(value, lazy_load=False):
|
||||||
if lazy_load:
|
if lazy_load:
|
||||||
soup = BeautifulSoup(html, features="lxml")
|
soup = BeautifulSoup(html, features="lxml")
|
||||||
for img in soup.findAll("img"):
|
for img in soup.findAll("img"):
|
||||||
img["data-src"] = img["src"]
|
if img.get("src"):
|
||||||
img["src"] = ""
|
img["data-src"] = img["src"]
|
||||||
|
img["src"] = ""
|
||||||
html = str(soup)
|
html = str(soup)
|
||||||
return '<div class="md-typeset">%s</div>' % html
|
return '<div class="md-typeset">%s</div>' % html
|
||||||
|
|
Loading…
Add table
Reference in a new issue