Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Decode HTML entities in Python string?

Current License: CC BY-SA 4.0

24 events
when toggle format what by license comment
Jul 3, 2024 at 18:52 comment added CarlosM Thank the lord!
Sep 6, 2023 at 11:12 comment added tripleee @canbax Those work for me. html.unescape('Don't forget that π = 3.14 & doesn't equal 3.') produces "Don't forget that π = 3.14 & doesn't equal 3." for me on Python 3.11.3
May 1, 2020 at 9:15 comment added canbax It does not work for 'Don&‌#039;t forget that &‌pi; = 3.14 &‌amp; doesn&‌#039;t equal 3.' WHY is that?
Jul 2, 2019 at 17:13 history edited wjandrea CC BY-SA 4.0
Move less important info down. Improve link formatting, layout, and clarity.
Sep 5, 2018 at 15:03 comment added anonymous coward Worth noting for Python 2: Special characters are replaced with their Latin-1 (ISO-8859-1) encoding counterparts. E.g., it may be necessary to h.unescape(s).encode("utf-8"). The docs: """The definition provided here contains all the entities defined by XHTML 1.0 that can be handled using simple textual substitution in the Latin-1 character set (ISO-8859-1)"""
Nov 27, 2016 at 20:00 comment added Tom Russell It would seem more logical that, rather than just the unescape method, the entire HTMLParser module were deprecated in favor of html.parser.
May 12, 2016 at 16:04 history edited Adam Nelson CC BY-SA 3.0
Gave Python 3.4+ precedence since it's current
Apr 30, 2016 at 12:43 history edited Mark Amery CC BY-SA 3.0
added 408 characters in body
Apr 30, 2016 at 12:28 history rollback Mark Amery
Rollback to Revision 8
Mar 1, 2016 at 21:09 history edited Nick T CC BY-SA 3.0
added 210 characters in body
Nov 28, 2015 at 20:18 history edited Mark Amery CC BY-SA 3.0
[Edit removed during grace period]
Nov 25, 2015 at 19:32 history edited Mark Amery CC BY-SA 3.0
deleted 29 characters in body
Nov 25, 2015 at 15:29 history edited Mark Amery CC BY-SA 3.0
fix caps
Nov 25, 2015 at 15:06 comment added Mark Amery @MarkusUnterwaditzer there's no reason that an undocumented method can't be deprecated. This one throws deprecation warnings - see my edit to the answer.
Nov 25, 2015 at 15:06 history edited Mark Amery CC BY-SA 3.0
add info about deprecation
Jun 5, 2015 at 18:15 comment added Markus Unterwaditzer How can an undocumented API be deprecated? Edited the answer.
Jun 5, 2015 at 18:13 history edited Markus Unterwaditzer CC BY-SA 3.0
Clarify that this method was never documented
Oct 8, 2014 at 5:36 history edited luc CC BY-SA 3.0
added 244 characters in body
May 19, 2014 at 22:16 review Suggested edits
May 19, 2014 at 22:20
S Sep 24, 2012 at 2:52 history suggested Joel Verhagen CC BY-SA 3.0
Added an example for Python 3
Sep 24, 2012 at 2:50 review Suggested edits
S Sep 24, 2012 at 2:52
Jul 10, 2010 at 14:40 comment added gfxmonk this method doesn't seem to escape characters like "’" on google app engine, though it works locally on python2.6. It does still decode entities (like ") at least
Jan 18, 2010 at 16:24 vote accept jkp
Jan 18, 2010 at 16:17 history answered luc CC BY-SA 2.5
toggle format

AltStyle によって変換されたページ (->オリジナル) /