diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-07 23:22:13 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-07 23:22:13 -0500 |
commit | c12086f610fe914db122489bc5b268d705297fc6 (patch) | |
tree | 80cae674c0131eb8c08e63757a40c1547f103046 /CHANGELOG | |
parent | 51201f331fc3dbf54f6035e0c61f246700e4c2e4 (diff) | |
download | beautifulsoup4-c12086f610fe914db122489bc5b268d705297fc6.tar.gz |
Newly created tags use the same empty-element rules as the builder used to originally create the soup.
Diffstat (limited to 'CHANGELOG')
-rw-r--r-- | CHANGELOG | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -1,13 +1,30 @@ = 4.0 beta 4 = -Added BeautifulSoup.new_string() to go along with Beautifulsoup.new_tag() -Pass in strict=False to html.parser on Python 3. -Monkeypatch a serious bug in html.parser that made strict=False disastrous on Python 3.2.2. +Added BeautifulSoup.new_string() to go along with BeautifulSoup.new_tag() + +BeautifulSoup.new_tag() will follow the rules of whatever tree-builder +was used to create the original BeautifulSoup object. A new <p> tag +will look like "<p />" if the soup object was created to parse XML, +but it will look like "<p></p>" if the soup object was created to +parse HTML. + +We pass in strict=False to html.parser on Python 3, greatly improving +html.parser's ability to handle bad HTML. + +Monkeypatch a serious bug in html.parser that made strict=False +disastrous on Python 3.2.2. + Replaced the "substitute_html_entities" argument with the "formatter" argument. -Bare ampersands and angle brackets are always converted to XML entities unless the user prevents it. + +Bare ampersands and angle brackets are always converted to XML +entities unless the user prevents it. + Added PageElement.insert_before(). + Added PageElement.insert_after(). -Raise an exception when the user tries to do something stupid like insert a tag into itself. + +Raise an exception when the user tries to do something nonsensical +like insert a tag into itself. = 4.0 = |