132
rated 0 times
[
136]
[
4]
/ answers: 1 / hits: 6923
/ 10 Years ago, fri, april 18, 2014, 12:00:00
From reading various posts, it seems like JavaScript's unescape()
is equivalent to Pythons urllib.unquote()
, however when I test both I get different results:
In browser console:
unescape('%u003c%u0062%u0072%u003e');
output: <br>
In Python interpreter:
import urllib
urllib.unquote('%u003c%u0062%u0072%u003e')
output: %u003c%u0062%u0072%u003e
I would expect Python to also return <br>
. Any ideas as to what I'm missing here?
Thanks!
More From » python