Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/hgweb.py @ 533:b8404005d6d5
[PATCH] Generate correctly XML entities for obfuscated user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] Generate correctly XML entities for obfuscated user
From: Edouard Gomez <ed.gomez@free.fr>
manifest hash: 8e4e2d087ff60020c948d34e724fca99c84a9115
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCxCpDywK+sNU5EO8RAs6yAKCy97yrMO6VYlkRIF3diLoGClZSOgCfekPE
ttPsLRoDTH12Tv6omFg6uUA=
=8ZBC
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Thu, 30 Jun 2005 09:22:11 -0800 |
parents | 03f27b1381f9 |
children | ab0d1bfeee7c |
comparison
equal
deleted
inserted
replaced
532:2e9698a5c92c | 533:b8404005d6d5 |
---|---|
41 | 41 |
42 def nl2br(text): | 42 def nl2br(text): |
43 return text.replace('\n', '<br/>\n') | 43 return text.replace('\n', '<br/>\n') |
44 | 44 |
45 def obfuscate(text): | 45 def obfuscate(text): |
46 return ''.join([ '&#%d' % ord(c) for c in text ]) | 46 return ''.join([ '&#%d;' % ord(c) for c in text ]) |
47 | 47 |
48 def up(p): | 48 def up(p): |
49 if p[0] != "/": p = "/" + p | 49 if p[0] != "/": p = "/" + p |
50 if p[-1] == "/": p = p[:-1] | 50 if p[-1] == "/": p = p[:-1] |
51 up = os.path.dirname(p) | 51 up = os.path.dirname(p) |