Skip to content

Commit

Permalink
Fix code scanning alert #455: Incomplete string escaping or encoding
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 8a4d1bb commit 9683e3c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ M.guid = function () {
* @returns {string}
*/
M.escapeHash = function (hash) {
return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, "\\$1");
return hash.replace(/\\/g, "\\\\").replace(/(:|\.|\[|\]|,|=|\/)/g, "\\$1");
};

M.elementOrParentIsFixed = function (element) {
Expand Down

0 comments on commit 9683e3c

Please sign in to comment.