Skip to content

Commit c6a760f

Browse files
committed
Workflow parser: fix escaping for XML files
1 parent 5b177cd commit c6a760f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DATA/tools/parse

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ for line in f:
153153
if 'GEN_TOPO_OOM_WORKAROUND' in os.environ and int(os.environ['GEN_TOPO_OOM_WORKAROUND']):
154154
command = 'sed -i \'s,^\( *.exe.*sleep [0-9.]*;\).*\(|[^|]*./exe.\)$,\\1 cat ' + filename + ' \\2,\' ' + filename_xml
155155
if 'GEN_TOPO_DDS_ASSETS' in os.environ and int(os.environ['GEN_TOPO_DDS_ASSETS']):
156-
command = 'sed -i \'s/\\(["\'"\'"\'<>]\\)/\\\\\\1/g\' ' + filename
156+
command = 'sed -i \'s/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/\'"\'"\'/\&#39;/g\' ' + filename
157157
print('Running SED command', command)
158158
if os.system(command) != 0:
159159
print('Error running sed on JSON file')

0 commit comments

Comments
 (0)