diff options
author | zsdc <taras@sentrium.io> | 2019-10-25 23:28:47 +0300 |
---|---|---|
committer | zsdc <taras@sentrium.io> | 2019-10-25 23:28:47 +0300 |
commit | 3cacaf94f05fe92d5eda1574a07e5fd49881d97d (patch) | |
tree | 2a418705379a3e8a1bac45dfaa9ef5d84c4e9d31 | |
parent | 4ed6e7bf28eb409228008eb6ea4adab7837c71cd (diff) | |
download | vyos-1x-3cacaf94f05fe92d5eda1574a07e5fd49881d97d.tar.gz vyos-1x-3cacaf94f05fe92d5eda1574a07e5fd49881d97d.zip |
[XML templates] T1772: Add escaping of `\` symbol in `<regex>`
-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 ba80eadb2..4fcdb8ade 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") |