1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2026-04-21 12:00:50 +02:00

Xenforo: change some of the style-removal

It was causing some formatting issues, particularly on Worm fics which
did forum-style sections. (Also, indented text done via margin-left on
divs, which entirely removed the div and ran lines together.)
This commit is contained in:
David Lynch 2022-04-27 11:07:16 -05:00
parent 56bc2b941c
commit e9f704716a

View file

@ -272,7 +272,9 @@ class XenForo(Site):
tag.wrap(self._new_tag('code'))
if "text-decoration: strikethrough" in tag['style']:
tag.wrap(self._new_tag('strike'))
tag.unwrap()
if "margin-left" in tag['style']:
continue
del tag['style']
for tag in post.select('.quoteExpand, .bbCodeBlock-expandLink, .bbCodeBlock-shrinkLink'):
tag.decompose()
self._clean(post)