Comment 5 for bug 1471755

Revision history for this message
John Sinteur (sinteur) wrote : Re: Many unclosed tags result in RuntimeError: maximum recursion depth exceeded while calling a Python object

Same problem in de code I use, narrowed it down to this prettify call on the html fetched from porkbun.com

def strip_irrelevant_html(html):
 soup = BeautifulSoup(html, 'html.parser')
 for tag in soup.select(','.join([
   f'{t}[nonce]' for t in ('script', 'style')])):
  del tag['nonce']
 return soup.prettify()