##// END OF EJS Templates
templatefilters: prefix helper functions
Patrick Mezard -
r13589:b0a4b05c default
parent child Browse files
Show More
@@ -129,7 +129,7 b' def json(obj):'
129 else:
129 else:
130 raise TypeError('cannot encode type %s' % obj.__class__.__name__)
130 raise TypeError('cannot encode type %s' % obj.__class__.__name__)
131
131
132 def uescape(c):
132 def _uescape(c):
133 if ord(c) < 0x80:
133 if ord(c) < 0x80:
134 return c
134 return c
135 else:
135 else:
@@ -143,7 +143,7 b' def uescape(c):'
143 def jsonescape(s):
143 def jsonescape(s):
144 for k, v in _escapes:
144 for k, v in _escapes:
145 s = s.replace(k, v)
145 s = s.replace(k, v)
146 return ''.join(uescape(c) for c in s)
146 return ''.join(_uescape(c) for c in s)
147
147
148 def nonempty(str):
148 def nonempty(str):
149 return str or "(none)"
149 return str or "(none)"
General Comments 0
You need to be logged in to leave comments. Login now