Reputation: 504
I'm using beautiful soup to parse a string containing <br>
, which beautiful soup is interpreting as <br>
.
Is there a way I can get beautiful soup to stop doing this, so that <br>
is left untouched and treated as a plain string, while <br>
is parsed normally?
Upvotes: 0
Views: 755
Reputation: 5713
You can use formatter="html"
to let the interpreter know about it as raw html. Basically the if you play around with the formatter
option you can get what you are expecting.
The documentation has details about it.
Upvotes: 1