Text extraction failing with JSON in 4.9.0

Bug #1877426 reported by Aubtin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Beautiful Soup
Invalid
Undecided
Unassigned

Bug Description

Upgrading BeautifulSoup from version 4.8.2 to version 4.9.0 and the following code goes from printing "test.test={"hello": "world", "error": true}" to nothing.

Is this intended as it is breaking?

Code:

from bs4 import BeautifulSoup
soup = BeautifulSoup('<script>test.test={"hello": "world", "error": true}</script>', 'html.parser')
print(soup.text)

EDIT: My mistake, I just saw this in the changelog. Please delete or close this issue.

Aubtin (aubtins)
description: updated
summary: - text extraction failing with JSON in 4.9.0
+ Text extraction failing with JSON in 4.9.0
Aubtin (aubtins)
description: updated
Aubtin (aubtins)
description: updated
Aubtin (aubtins)
description: updated
Revision history for this message
Leonard Richardson (leonardr) wrote :

No problem, this is a common stumbling block for 4.9.0 upgrades.

Changed in beautifulsoup:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.