xml hacks-test

This commit is contained in:
bpatel
2020-06-04 15:34:54 -07:00
parent 2b73807b58
commit ee9545293e
+6 -1
View File
@@ -21,7 +21,6 @@ REPO_PATH = ''
VERBOSE = False
OUTPUT_PATH = ''
def load_objects(file_path, VERBOSE):
files = []
manifest_files = path.join(path.expanduser(REPO_PATH), file_path)
@@ -254,6 +253,12 @@ def generate_workbench_panels(response_tasks, stories):
trim_blocks=True)
template = j2_env.get_template('panel.j2')
output_path = OUTPUT_PATH + "/default/data/ui/panels/workbench_panel_" + response_file_name + ".xml"
if response_task['search'].find(">") is not -1:
response_task['search']= response_task['search'].replace(">",">")
if response_task['search'].find("<") is not -1:
response_task['search']= response_task['search'].replace("<","&lt;")
output = template.render(search=response_task['search'])
with open(output_path, 'w') as f:
f.write(output)