blob: 2c42cf852b577f0fa7c6924f98d1183fd80a7561 [file] [log] [blame]
Georg Brandl1f7fffb2010-10-15 15:57:45 +00001:mod:`html` --- HyperText Markup Language support
2=================================================
3
4.. module:: html
5 :synopsis: Helpers for manipulating HTML.
6
7.. versionadded:: 3.2
8
9
10This module defines utilities to manipulate HTML.
11
12.. function:: escape(s, quote=True)
13
14 Convert the characters ``&``, ``<`` and ``>`` in string *s* to HTML-safe
15 sequences. Use this if you need to display text that might contain such
16 characters in HTML. If the optional flag *quote* is true, the characters
17 (``"``) and (``'``) are also translated; this helps for inclusion in an HTML
18 attribute value delimited by quotes, as in ``<a href="...">``.