How to use the whatwg-url.percentDecode function in whatwg-url

To help you get started, we’ve selected a few whatwg-url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sx1989827 / DOClever / node_modules / jsdom / lib / jsdom / living / window / navigation.js View on Github external
exports.evaluateJavaScriptURL = (window, urlRecord) => {
  const urlString = whatwgURL.serializeURL(urlRecord);
  const scriptSource = whatwgURL.percentDecode(Buffer.from(urlString)).toString();
  if (window._runScripts === "dangerously") {
    try {
      return window.eval(scriptSource);
    } catch (e) {
      reportException(window, e, urlString);
    }
  }
  return undefined;
};
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / living / window / navigation.js View on Github external
exports.evaluateJavaScriptURL = (window, urlRecord) => {
  const urlString = whatwgURL.serializeURL(urlRecord);
  const scriptSource = whatwgURL.percentDecode(Buffer.from(urlString)).toString();
  if (window._runScripts === "dangerously") {
    try {
      return window.eval(scriptSource);
    } catch (e) {
      reportException(window, e, urlString);
    }
  }
  return undefined;
};
github jsdom / data-urls / lib / utils.js View on Github external
exports.stringPercentDecode = input => {
  return percentDecode(Buffer.from(input, "utf-8"));
};
github jsdom / jsdom / lib / jsdom / living / window / navigation.js View on Github external
exports.evaluateJavaScriptURL = (window, urlRecord) => {
  const urlString = whatwgURL.serializeURL(urlRecord);
  const scriptSource = whatwgURL.percentDecode(Buffer.from(urlString)).toString();
  if (window._runScripts === "dangerously") {
    try {
      return window.eval(scriptSource);
    } catch (e) {
      reportException(window, e, urlString);
    }
  }
  return undefined;
};
github sx1989827 / DOClever / node_modules / data-urls / lib / utils.js View on Github external
exports.stringPercentDecode = input => {
  return percentDecode(Buffer.from(input, "utf-8"));
};