sajingeo / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

Web interface improperly escapes % #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce, upload a changelist and put a URL with % escaped chars 
in the changelist description or a comment, e.g. the first comment in

http://codereview.chromium.org/159635

which contains the URL

http://build.chromium.org/buildbot/waterfall.fyi/builders/Chromium%20Linux%
20(Fedora%2011,%20dbg)/builds/2970/steps/compile/logs/stdio

The email that goes out works great; the URL is clickable, and works,
But on the web interface, the URL looks great, and if you copy and
paste it into a browser it works, but if you click on it directly you
get taken to
http://build.chromium.org/buildbot/waterfall.fyi/builders/Chromium%2520Linu
x%2520(Fedora%252011%2C%2520dbg)/builds/2970/steps/compile/logs/stdio

In other words, the % char in the URL that is itself part of
an escape is escaped, turning %20 into %2520.  No es bueno :-)

Original issue reported on code.google.com by daniel.r...@gmail.com on 30 Jul 2009 at 1:44

GoogleCodeExporter commented 9 years ago
I'm not sure there's much we can do about this -- urlizing text uses a 
heuristic, an
cannot be made 100% perfect. (Also I think we just use Django's urlize filter, 
so
your bug probably goes to a different tracker.) I note that this very bug 
tracker
does an even poorer job, breaking the URLs you mentioned in two and linking to 
the
broken first half of each.

Original comment by gvanrossum@gmail.com on 30 Jul 2009 at 7:29

GoogleCodeExporter commented 9 years ago
This is an issue with Django's urlize/urlizetrunc filter. Discussion can be 
found on Django's issue tracker: http://code.djangoproject.com/ticket/9655

Original comment by albrecht.andi on 11 Feb 2011 at 8:30