Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed JSON templates to avoid invalid \x character sequences and to a…

…void new Date(), which is not valid JSON.
  • Loading branch information...
commit 5b6f3c62e1e312cf890df7f20be0687ca380bea8 1 parent 28277fa
@dvogel authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  templates/JSON/documents.tpl
  2. +1 −1  templates/JSON/search.tpl
View
2  templates/JSON/documents.tpl
@@ -9,7 +9,7 @@
"fragments" : [{{#FRAGMENT}}[{{FROM}},{{TO}},{{LENGTH}},{{HASH}}]{{#FRAGMENT_separator}},{{/FRAGMENT_separator}}{{/FRAGMENT}}],
{{/FRAGMENTS}}
{{#META}}
- "{{KEY}}": {{#NUMBER}}{{VALUE}}{{/NUMBER}}{{#STRING}}"{{VALUE}}"{{/STRING}}{{#DATE}}new Date({{VALUE}}){{/DATE}}{{#META_separator}},{{/META_separator}}
+ "{{KEY}}": {{#NUMBER}}{{VALUE}}{{/NUMBER}}{{#STRING}}"{{VALUE:json_escape}}"{{/STRING}}{{#DATE}}{{VALUE}}{{/DATE}}{{#META_separator}},{{/META_separator}}
{{/META}}
}{{#DOCUMENT_separator}},{{/DOCUMENT_separator}}
{{/DOCUMENT}}
View
2  templates/JSON/search.tpl
@@ -3,5 +3,5 @@
{{>DOCUMENTS}}
},
{{#SOURCE}}
- "text" : "{{TEXT}}"
+ "text" : "{{TEXT:json_escape}}"
{{/SOURCE}}
Please sign in to comment.
Something went wrong with that request. Please try again.