mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-19 12:36:06 +00:00
Added escaped JSON output.
This commit is contained in:
parent
13a2880fa0
commit
a464841867
@ -0,0 +1,2 @@
|
||||
#from protocols.https.templates.json.escape import json_escape
|
||||
$json_escape($services)
|
||||
@ -0,0 +1,2 @@
|
||||
#from protocols.https.templates.json.escape import json_escape
|
||||
$json_escape($locations)
|
||||
@ -1 +1,2 @@
|
||||
$hosts
|
||||
#from protocols.https.templates.json.escape import json_escape
|
||||
$json_escape($hosts)
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
import cgi, json
|
||||
|
||||
def json_escape(x):
|
||||
return [json.dumps(cgi.escape(y)) for y in x]
|
||||
@ -0,0 +1,2 @@
|
||||
#from protocols.https.templates.json.escape import json_escape
|
||||
$json_escape($services)
|
||||
@ -0,0 +1,2 @@
|
||||
#from protocols.https.templates.json.escape import json_escape
|
||||
$json_escape($locations)
|
||||
@ -0,0 +1,2 @@
|
||||
#from protocols.https.templates.json.escape import json_escape
|
||||
$json_escape($clients)
|
||||
Loading…
x
Reference in New Issue
Block a user