summaryrefslogtreecommitdiff
path: root/scripts/build-command-templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-10-28 11:00:06 -0500
committerGitHub <noreply@github.com>2019-10-28 11:00:06 -0500
commit4efcd7d44b2194eb36b381fd0ad639fd402c6c6d (patch)
tree8b5fe1163cdba0e001056413da1a2c8fce48f112 /scripts/build-command-templates
parentaac75107bc9988ecb599265da029827ff09bf713 (diff)
parent8ae02a738df9746ad648a9611ae03e62b5af9e5d (diff)
downloadvyos-1x-4efcd7d44b2194eb36b381fd0ad639fd402c6c6d.tar.gz
vyos-1x-4efcd7d44b2194eb36b381fd0ad639fd402c6c6d.zip
Merge pull request #154 from zdc/T1772
[XML templates] T1772: Add escaping of `\` symbol in `<regex>`
Diffstat (limited to 'scripts/build-command-templates')
-rwxr-xr-xscripts/build-command-templates2
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")