RightArrowLeftArrow is a named entity in HTML5, so the simplest way to solve your problem is to use the html5lib parser, which understands that entity:
I spent some time looking into whether it's possible to make the other parsers able to handle HTML5 named entities, and it does seem possible in almost all cases.
RightArrowLeftArrow is a named entity in HTML5, so the simplest way to solve your problem is to use the html5lib parser, which understands that entity:
soup = BeautifulSoup( "<div>& RightArrowLeftA rrow;</ div>", "html5lib") formatter= None) <head>< /head>< body><div> ⇄</div> </body> </html> '
soup.decode(
# '<html>
I spent some time looking into whether it's possible to make the other parsers able to handle HTML5 named entities, and it does seem possible in almost all cases.