diff options
author | zsdc <taras@sentrium.io> | 2019-10-25 23:28:47 +0300 |
---|---|---|
committer | John Estabrook <jestabro@sentrium.io> | 2019-11-19 13:04:34 -0600 |
commit | c6ebbc3b047ad43222e3d9f5bfb791c972bf3c5e (patch) | |
tree | f805d58cdb6e6271a3fde6cfb62024fbe100586a /scripts/build-command-templates | |
parent | 3d396586ee953c708465e00b6fef5d1f520d587c (diff) | |
download | vyos-1x-c6ebbc3b047ad43222e3d9f5bfb791c972bf3c5e.tar.gz vyos-1x-c6ebbc3b047ad43222e3d9f5bfb791c972bf3c5e.zip |
[XML templates] T1772: Add escaping of `\` symbol in `<regex>`
(cherry picked from commit 3cacaf94f05fe92d5eda1574a07e5fd49881d97d)
Diffstat (limited to 'scripts/build-command-templates')
-rwxr-xr-x | scripts/build-command-templates | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build-command-templates b/scripts/build-command-templates index 07e7d522a..6d37a80ec 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -125,7 +125,7 @@ def get_properties(p): regexes = [] regex_elements = vce.findall("regex") if regex_elements is not None: - regexes = list(map(lambda e: e.text.strip(), regex_elements)) + regexes = list(map(lambda e: e.text.strip().replace('\\','\\\\'), regex_elements)) if "" in regexes: print("Warning: empty regex, node will be accepting any value") |