Skip to content

Commit

Permalink
fix: Fix code scanning alert no. 16: Incomplete string escaping or en…
Browse files Browse the repository at this point in the history
…coding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 3c64e12 commit 5b6b6df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/src/builder/BuilderTemplateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const getPath = (text) => {
* Escape a key to support the "." and "\" in a state variable
*/
const escapeVariable = (key) => {
return key.replace("\\", "\\\\").replace(".", "\\.");
return key.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
};
const handleInput = (ev) => {
Expand Down

0 comments on commit 5b6b6df

Please sign in to comment.