mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-23 15:33:29 +02:00
Rollback of potentially destructive while loop.
This commit is contained in:
parent
3cd6019ce3
commit
bc0524132e
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ def replace_br_with_p(body):
|
|||
# change surrounding div to a p and remove attrs Top surrounding
|
||||
# tag in all cases now should be div, to just strip the first and
|
||||
# last tags.
|
||||
while is_valid_block(body) and body.find('<div') == 0:
|
||||
if is_valid_block(body) and body.find('<div') == 0:
|
||||
body = body[body.index('>')+1:body.rindex('<')].strip()
|
||||
|
||||
body = soup_up_div(u'<div>' + body + u'</div>')
|
||||
|
|
|
|||
Loading…
Reference in a new issue