Mercurial > hg
annotate tests/test-eolfilename.out @ 11765:aff419e260f9 stable
templatefilters: make json filter handle multibyte characters correctly
It aims to fix javascript error of hgweb's graph view in Japanese 'cp932'
encoding.
'cp932' contains multibyte characters ending with '\x5c' (backslash),
e.g. '\x94\x5c' for Japanese Kanji 'Noh'.
Due to json filter escapes '\' to '\\', multibyte string ending with
'\x5c' is translated to "xxx\", resulting javascript parse error on
a web browser.
This patch changes json() to pass unicode to jsonescape().
Unicode decoding error handler changed to 'replace' by Patrick Mézard.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 07 Aug 2010 16:27:16 +0900 |
parents | b66388f6adfa |
children |
rev | line source |
---|---|
10475
2253715fde97
color: don't crash on invalid status codes (issue2036)
Brodie Rao <me+hg@dackz.net>
parents:
6138
diff
changeset
|
1 % test issue352 |
3607
f4c9bb4ad7b1
issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
2 adding he llo |
6138
09847b90beae
Report filenames with disallowed characters as suggested by Mika Eloranta
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4186
diff
changeset
|
3 abort: '\n' and '\r' disallowed in filenames: 'he\rllo' |
3607
f4c9bb4ad7b1
issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
4 adding he llo |
6138
09847b90beae
Report filenames with disallowed characters as suggested by Mika Eloranta
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4186
diff
changeset
|
5 abort: '\n' and '\r' disallowed in filenames: 'he\rllo' |
4186
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
6 adding hell |
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
7 o |
6138
09847b90beae
Report filenames with disallowed characters as suggested by Mika Eloranta
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4186
diff
changeset
|
8 abort: '\n' and '\r' disallowed in filenames: 'hell\no' |
4186
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
9 adding hell |
3607
f4c9bb4ad7b1
issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
10 o |
6138
09847b90beae
Report filenames with disallowed characters as suggested by Mika Eloranta
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4186
diff
changeset
|
11 abort: '\n' and '\r' disallowed in filenames: 'hell\no' |
4186
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
12 f he llo he llo |
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
13 f hell |
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
14 o hell |
08d31e43592a
Leave normalization of patterns to util._matcher
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3607
diff
changeset
|
15 o |
10475
2253715fde97
color: don't crash on invalid status codes (issue2036)
Brodie Rao <me+hg@dackz.net>
parents:
6138
diff
changeset
|
16 % test issue2039 |
10827
b66388f6adfa
color: don't split colors across lines (which confuses less -R)
Brodie Rao <brodie@bitheap.org>
parents:
10826
diff
changeset
|
17 [0;35;1;4m? foo[0m |
b66388f6adfa
color: don't split colors across lines (which confuses less -R)
Brodie Rao <brodie@bitheap.org>
parents:
10826
diff
changeset
|
18 [0;35;1;4mbar[0m |
b66388f6adfa
color: don't split colors across lines (which confuses less -R)
Brodie Rao <brodie@bitheap.org>
parents:
10826
diff
changeset
|
19 [0;35;1;4m? foo[0m |
b66388f6adfa
color: don't split colors across lines (which confuses less -R)
Brodie Rao <brodie@bitheap.org>
parents:
10826
diff
changeset
|
20 [0;35;1;4mbar.baz[0m |