Htmltext and latin-1 characters
2006-05-10
Mike OrrRe: [Cheetahtemplate-discuss] Htmltext and latin-1
characters
2006-05-10
Ian BickingRe: [Cheetahtemplate-discuss] Htmltext and
latin-1 characters
2006-05-11
David BingerRe: [Cheetahtemplate-discuss] Htmltext and latin-1
characters
2006-05-10
Mike Orr2006-05-11
David Binger2006-05-11
Mike Orr2006-05-11
David Binger2006-05-11
David Binger2006-05-11
David Binger2006-05-13
Akihiro KAYAMA2006-05-13
Mike Orr2006-05-15
Akihiro KAYAMARe: Htmltext and latin-1 characters
2006-06-04
Neil Schemenauer2006-06-04
ak (2 parts)2006-06-06
Akihiro KAYAMARe: Htmltext and latin-1 characters
2006-06-05
Neil Schemenauer2006-06-05
Akihiro KAYAMA2006-06-05
Neil Schemenauer2006-06-05
Mike Orr2006-06-06
Neil Schemenauer2006-06-05
Mike OrrRe: [Cheetahtemplate-discuss] Htmltext and latin-1
characters
Ian Bicking
You might find the WebHelpers html_quote function useful:
http://pylonshq.com/project/pylonshq/browser/WebHelpers/trunk/webhelpers/util.py
Specifically asciification:
if not isinstance(s, basestring):
if hasattr(s, '__unicode__'):
s = unicode(s)
else:
s = str(s)
s = cgi.escape(s, True)
if isinstance(s, unicode):
s = s.encode('ascii', 'xmlcharrefreplace')
--
Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org