url - JavaScript: Replace hexadecimal character -


I have a string like "% 2Fu% 2F2069290% 2F" in JavaScript (extracted from Gone) a web page). How do I get a human-readable version of that string?

short version : decodericompany () Use the.

Tall version : You can use unescape () in the old versions of JavaScript, but it has been removed because it only has LATIN1 / Works fine for ISO8859-1 codeet, so you actually want to use decodeurIComponent () , which is supported by all modern browsers.

  var c = decodeurIComponent ("% 2Fu% 2F2069290% 2F"));  

Comments

Popular posts from this blog

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -