Show More
@@ -230,7 +230,7 b' def json(obj, paranoid=True):' | |||||
230 | elif obj is True: |
|
230 | elif obj is True: | |
231 | return 'true' |
|
231 | return 'true' | |
232 | elif isinstance(obj, (int, long, float)): |
|
232 | elif isinstance(obj, (int, long, float)): | |
233 | return str(obj) |
|
233 | return pycompat.bytestr(obj) | |
234 | elif isinstance(obj, str): |
|
234 | elif isinstance(obj, str): | |
235 | return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) |
|
235 | return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) | |
236 | elif util.safehasattr(obj, 'keys'): |
|
236 | elif util.safehasattr(obj, 'keys'): | |
@@ -359,7 +359,7 b' def stringify(thing):' | |||||
359 | return "".join([stringify(t) for t in thing if t is not None]) |
|
359 | return "".join([stringify(t) for t in thing if t is not None]) | |
360 | if thing is None: |
|
360 | if thing is None: | |
361 | return "" |
|
361 | return "" | |
362 | return str(thing) |
|
362 | return pycompat.bytestr(thing) | |
363 |
|
363 | |||
364 | @templatefilter('stripdir') |
|
364 | @templatefilter('stripdir') | |
365 | def stripdir(text): |
|
365 | def stripdir(text): |
General Comments 0
You need to be logged in to leave comments.
Login now