From 9607b5f29129c9876f3b412f0543e5521a6bbd0f Mon Sep 17 00:00:00 2001 From: yellmean Date: Fri, 12 Apr 2024 20:30:55 +0800 Subject: [PATCH] Update p17_handle_html_xml_in_text.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python3.5以后使用 html.unescape(s) --- source/c02/p17_handle_html_xml_in_text.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/c02/p17_handle_html_xml_in_text.rst b/source/c02/p17_handle_html_xml_in_text.rst index 141a8fcb..e125cf90 100644 --- a/source/c02/p17_handle_html_xml_in_text.rst +++ b/source/c02/p17_handle_html_xml_in_text.rst @@ -49,7 +49,7 @@ >>> s = 'Spicy "Jalapeño".' >>> from html.parser import HTMLParser >>> p = HTMLParser() - >>> p.unescape(s) + >>> p.unescape(s) # Python3.5以后使用 html.unescape(s) 'Spicy "Jalapeño".' >>> >>> t = 'The prompt is >>>'