Exemple #1
0
        /// <summary>
        /// Unescapes |text| and returns the result. Unescaping consists of looking for
        /// the exact pattern "%XX" where each X is a hex digit and converting to the
        /// character with the numerical value of those digits (e.g. "i%20=%203%3b"
        /// unescapes to "i = 3;"). If |convert_to_utf8| is true this function will
        /// attempt to interpret the initial decoded result as UTF-8. If the result is
        /// convertable into UTF-8 it will be returned as converted. Otherwise the
        /// initial decoded result will be returned.  The |unescape_rule| parameter
        /// supports further customization the decoding process.
        /// </summary>
        public static string UriDecode(string text, bool convertToUtf8, CefUriUnescapeRules unescapeRule)
        {
            fixed(char *text_str = text)
            {
                var n_text = new cef_string_t(text_str, text != null ? text.Length : 0);

                var n_result = libcef.uridecode(&n_text, convertToUtf8 ? 1 : 0, unescapeRule);

                return(cef_string_userfree.ToString(n_result));
            }
        }
Exemple #2
0
 public static extern cef_string_userfree *uridecode(cef_string_t *text, int convert_to_utf8, CefUriUnescapeRules unescape_rule);