summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-11-19 18:28:45 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-11-19 18:28:45 (GMT)
commit4a9ee26750aa8cb37b5072b2bb4dd328819febb4 (patch)
treebc714725cf478795c34bd9f8200a52424a47474b /Doc
parent5160da1afc07ab759a95d2b863134a88b9318e65 (diff)
downloadcpython-4a9ee26750aa8cb37b5072b2bb4dd328819febb4.zip
cpython-4a9ee26750aa8cb37b5072b2bb4dd328819febb4.tar.gz
cpython-4a9ee26750aa8cb37b5072b2bb4dd328819febb4.tar.bz2
#2927: Added the unescape() function to the html module.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/html.entities.rst1
-rw-r--r--Doc/library/html.rst11
2 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/html.entities.rst b/Doc/library/html.entities.rst
index 65ce817..ba8324c 100644
--- a/Doc/library/html.entities.rst
+++ b/Doc/library/html.entities.rst
@@ -20,6 +20,7 @@ This module defines four dictionaries, :data:`html5`,
Note that the trailing semicolon is included in the name (e.g. ``'gt;'``),
however some of the names are accepted by the standard even without the
semicolon: in this case the name is present with and without the ``';'``.
+ See also :func:`html.unescape`.
.. versionadded:: 3.3
diff --git a/Doc/library/html.rst b/Doc/library/html.rst
index 1107ca9..d0706bc 100644
--- a/Doc/library/html.rst
+++ b/Doc/library/html.rst
@@ -20,6 +20,17 @@ This module defines utilities to manipulate HTML.
.. versionadded:: 3.2
+
+.. function:: unescape(s)
+
+ Convert all named and numeric character references (e.g. ``&gt;``,
+ ``&#62;``, ``&x3e;``) in the string *s* to the corresponding unicode
+ characters. This function uses the rules defined by the HTML 5 standard
+ for both valid and invalid character references, and the :data:`list of
+ HTML 5 named character references <html.entities.html5>`.
+
+ .. versionadded:: 3.4
+
--------------
Submodules in the ``html`` package are: