Merge pull request #16208 from Snuffleupagus/recoverJsURL-replaceAll
Use `replaceAll` in the `recoverJsURL` helper function
This commit is contained in:
commit
b3e2e26079
@ -515,7 +515,7 @@ function recoverJsURL(str) {
|
||||
const URL_OPEN_METHODS = ["app.launchURL", "window.open", "xfa.host.gotoURL"];
|
||||
const regex = new RegExp(
|
||||
"^\\s*(" +
|
||||
URL_OPEN_METHODS.join("|").split(".").join("\\.") +
|
||||
URL_OPEN_METHODS.join("|").replaceAll(".", "\\.") +
|
||||
")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))",
|
||||
"i"
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user