mercurial/hgweb/webutil.py
changeset 25778 3a33412792f1
parent 25602 85fb416f2fa7
child 25999 1c75249e159b
--- a/mercurial/hgweb/webutil.py	Sun Jul 12 16:06:57 2015 +0800
+++ b/mercurial/hgweb/webutil.py	Sun Jul 12 16:47:56 2015 +0800
@@ -6,10 +6,11 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-import os, copy, urllib
+import os, copy
 from mercurial import match, patch, error, ui, util, pathutil, context
 from mercurial.i18n import _
 from mercurial.node import hex, nullid, short
+from mercurial.templatefilters import revescape
 from common import ErrorResponse, paritygen
 from common import HTTP_NOT_FOUND
 import difflib
@@ -281,7 +282,7 @@
 
 def symrevorshortnode(req, ctx):
     if 'node' in req.form:
-        return urllib.quote(req.form['node'][0])
+        return revescape(req.form['node'][0])
     else:
         return short(ctx.node())