Skip to content

Commit 8257c14

Browse files
Potential fix for code scanning alert no. 25: Incomplete string escaping or encoding (#1660)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 1de6835 commit 8257c14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sourcefiles/modern/plugins/momentjs/moment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ function getParseRegexForToken(token, config) {
800800
function unescapeFormat(s) {
801801
return regexEscape(
802802
s
803-
.replace('\\', '')
803+
.replace(/\\/g, '')
804804
.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
805805
matched,
806806
p1,

0 commit comments

Comments
 (0)