Python Paste


funcs

General-(web-)purpose functions for use in your applications.


Functions

f html_quote(v) ...

HTML quote the value. None becomes an empty string. If a value has an __html__ method, that will be called to get the HTML.

f url_quote(v) ...

URL quote the value. None becomes the empty string. Dictionaries are mapped to

f html_quote_whitespace(v, newlines=True, strip=True) ...

HTML quote a value, and then make sure its whitespace is preserved. If newlines is true, then also turn newlines into <br> -- otherwise just horizontal whitespace will be preserved (using &nbsp;).

See the source for more information.