List of utility methods to do Javascript String Unescape
String | unescapeJavaScript(String value) unescape Java Script return unescapeJava(value);
|
String | unescapeJavascriptParam(String s) This function is used to convert a URL friendly string which was encoded using the Javascript escape function into a normal Java String. StringBuffer sbuf = new StringBuffer(); int l = s.length(); int ch = -1; int b, sumb = 0; for (int i = 0, more = -1; i < l; i++) { switch (ch = s.charAt(i)) { case '%': ch = s.charAt(++i); ... |
String | unescapeJavaScriptString(String string) Unescape JS strings and return them, surrounded by single quotes. StringBuilder ret = new StringBuilder(string.length()).append('\''); for (int i = 0; i < string.length(); i++) { char chr = string.charAt(i); switch (chr) { case '\b': ret.append("\\b"); break; case '\f': ... |
String | unescapeJavaString(String st) Unescapes a string that contains standard Java escape sequences. if (st == null) { return null; StringBuilder sb = new StringBuilder(st.length()); for (int i = 0; i < st.length(); i++) { char ch = st.charAt(i); if (ch == '\\') { char nextChar = (i == st.length() - 1) ? '\\' : st.charAt(i + 1); ... |
String | unescapeJavaString(String str) Unescapes any Java literals found in the For example, it will turn a sequence of A if (str == null) { return null; StringBuffer out = new StringBuffer(); int sz = str.length(); StringBuffer unicode = new StringBuffer(4); boolean hadSlash = false; boolean inUnicode = false; ... |