mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #16208 from Snuffleupagus/recoverJsURL-replaceAll
Use `replaceAll` in the `recoverJsURL` helper function
This commit is contained in:
commit
b3e2e26079
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue