Previous Next blank.gif Home Page

Function escape - Converts the special characters '<', '>', and '&'.


SYNOPSIS

import HTMLgen
def escape(text)

DESCRIPTION

RFC 1866 specifies that these characters be represented in HTML as &lt; &gt; and &amp; respectively. In Python 1.5 we use the new string.replace() function for speed.

SEE ALSO

HTMLgen


Previous Next blank.gif Home Page
Buzz.gif

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Sun Jun 14 1998