-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bugfix/prevent-whitespace-at-the-end-of-name
- Loading branch information
Showing
11 changed files
with
94 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | ||
version: v1.13.5 | ||
ignore: {} | ||
# patches apply the minimum changes required to fix a vulnerability | ||
patch: | ||
SNYK-JS-LODASH-450202: | ||
- babel-eslint > @babel/traverse > lodash: | ||
patched: '2019-07-04T06:36:45.449Z' | ||
- babel-eslint > @babel/traverse > @babel/generator > lodash: | ||
patched: '2019-07-04T06:36:45.449Z' | ||
- babel-eslint > @babel/traverse > @babel/helper-split-export-declaration > @babel/types > lodash: | ||
patched: '2019-07-04T06:36:45.449Z' | ||
- babel-eslint > @babel/traverse > @babel/helper-function-name > @babel/template > @babel/types > lodash: | ||
patched: '2019-07-04T06:36:45.449Z' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
/** | ||
* Returns an XPath string literal to use for searching values inside | ||
* element/attribute. | ||
* | ||
* This wraps them in single quotes, double quotes, or as a concat function, | ||
* as xpath expressions can contain single or double quotes but not both. | ||
* Also, xpath does not support escaping. | ||
* | ||
* {@link https://stackoverflow.com/q/1341847 Special Character in XPATH Query} | ||
* {@link https://stackoverflow.com/q/642125 Encoding XPath Expressions with both single and double quotes} | ||
* | ||
* @param {string} value | ||
* @returns {string} | ||
*/ | ||
buildXpathLiteral: function (value) { | ||
if (!value.includes("'")) { | ||
// if we don't have any single quotes, then wrap them with single quotes | ||
return "'" + value + "'" | ||
} else if (!value.includes('"')) { | ||
// if we don't have any double quotes, then wrap them with double quotes | ||
return '"' + value + '"' | ||
} else { | ||
// use concat to find the literal in the xpath if they contain both quotes | ||
return "concat('" + value.replace("'", "',\"'\",'") + "')" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters