diff --git a/ugly_hacks/santiago/protocols/https/templates/__init__.py b/ugly_hacks/santiago/protocols/https/templates/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/ugly_hacks/santiago/protocols/https/templates/json/__init__.py b/ugly_hacks/santiago/protocols/https/templates/json/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/ugly_hacks/santiago/protocols/https/templates/json/consumedHost.tmpl b/ugly_hacks/santiago/protocols/https/templates/json/consumedHost.tmpl new file mode 100644 index 000000000..46aa8ab03 --- /dev/null +++ b/ugly_hacks/santiago/protocols/https/templates/json/consumedHost.tmpl @@ -0,0 +1,2 @@ +#from protocols.https.templates.json.escape import json_escape +$json_escape($services) diff --git a/ugly_hacks/santiago/protocols/https/templates/json/consumedService.tmpl b/ugly_hacks/santiago/protocols/https/templates/json/consumedService.tmpl new file mode 100644 index 000000000..7a1b1baa4 --- /dev/null +++ b/ugly_hacks/santiago/protocols/https/templates/json/consumedService.tmpl @@ -0,0 +1,2 @@ +#from protocols.https.templates.json.escape import json_escape +$json_escape($locations) \ No newline at end of file diff --git a/ugly_hacks/santiago/protocols/https/templates/json/consuming.tmpl b/ugly_hacks/santiago/protocols/https/templates/json/consuming.tmpl index 8c0c185ba..3d3f748a7 100644 --- a/ugly_hacks/santiago/protocols/https/templates/json/consuming.tmpl +++ b/ugly_hacks/santiago/protocols/https/templates/json/consuming.tmpl @@ -1 +1,2 @@ -$hosts +#from protocols.https.templates.json.escape import json_escape +$json_escape($hosts) diff --git a/ugly_hacks/santiago/protocols/https/templates/json/escape.py b/ugly_hacks/santiago/protocols/https/templates/json/escape.py new file mode 100644 index 000000000..ba672b03f --- /dev/null +++ b/ugly_hacks/santiago/protocols/https/templates/json/escape.py @@ -0,0 +1,4 @@ +import cgi, json + +def json_escape(x): + return [json.dumps(cgi.escape(y)) for y in x] diff --git a/ugly_hacks/santiago/protocols/https/templates/json/hostedClient.tmpl b/ugly_hacks/santiago/protocols/https/templates/json/hostedClient.tmpl new file mode 100644 index 000000000..46aa8ab03 --- /dev/null +++ b/ugly_hacks/santiago/protocols/https/templates/json/hostedClient.tmpl @@ -0,0 +1,2 @@ +#from protocols.https.templates.json.escape import json_escape +$json_escape($services) diff --git a/ugly_hacks/santiago/protocols/https/templates/json/hostedService.tmpl b/ugly_hacks/santiago/protocols/https/templates/json/hostedService.tmpl new file mode 100644 index 000000000..a9e7286ca --- /dev/null +++ b/ugly_hacks/santiago/protocols/https/templates/json/hostedService.tmpl @@ -0,0 +1,2 @@ +#from protocols.https.templates.json.escape import json_escape +$json_escape($locations) diff --git a/ugly_hacks/santiago/protocols/https/templates/json/hosting.tmpl b/ugly_hacks/santiago/protocols/https/templates/json/hosting.tmpl new file mode 100644 index 000000000..964ca9c90 --- /dev/null +++ b/ugly_hacks/santiago/protocols/https/templates/json/hosting.tmpl @@ -0,0 +1,2 @@ +#from protocols.https.templates.json.escape import json_escape +$json_escape($clients)