diff --git a/resources/templates/form.tmpl b/resources/templates/form.tmpl
index c984641..243b173 100644
--- a/resources/templates/form.tmpl
+++ b/resources/templates/form.tmpl
@@ -1,5 +1,6 @@
## -*- coding: utf-8 -*-
<%
+from markupsafe import Markup
len_attr = len(attributes)
switch = len_attr / 2
if not switch * 2 == len_attr:
@@ -31,32 +32,32 @@ for a in sorted(attributes.keys(), key=lambda attr: attributes[attr]['weight']):
raw_value = values[a]
if raw_value is None:
raw_value = ''
- value = ' value="'+ raw_value + '"'
- value2 = ''
+ value = Markup(' value="{}"').format(raw_value)
+ value2 = Markup('').format(raw_value)
else:
raw_value = ''
value = ''
value2 = ''
if 'default' in attr and value == '':
- value = ' value="'+ attr['default'] + '"'
+ value = Markup(' value="{}"').format(attr['default'])
%>
${attr['display_name']}
% if modify and a == keyattr:
-
+
${raw_value}
% elif attr['type'] == 'string':
-
+
% elif attr['type'] == 'email':
-
+
% elif attr['type'] == 'int':
-
+
% elif attr['type'] == 'fix':
${attr['value']}
% elif attr['type'] == 'stringlist':