mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-07 07:50:26 +00:00
Escape less than sign
Otherwise tiddlers containing `</script>` will break TiddlyWiki
This commit is contained in:
parent
ff184822ca
commit
4d42d4a190
@ -50,11 +50,11 @@ exports.handler = function(request,response,state) {
|
|||||||
}
|
}
|
||||||
response.write(template.substring(0,markerPos + marker.length));
|
response.write(template.substring(0,markerPos + marker.length));
|
||||||
$tw.utils.each(recipeTiddlers,function(recipeTiddlerInfo) {
|
$tw.utils.each(recipeTiddlers,function(recipeTiddlerInfo) {
|
||||||
response.write(JSON.stringify($tw.sqlTiddlerStore.getRecipeTiddler(recipeTiddlerInfo.title,recipe_name).tiddler));
|
response.write(JSON.stringify($tw.sqlTiddlerStore.getRecipeTiddler(recipeTiddlerInfo.title,recipe_name).tiddler).replace(/</g,"\\u003c"));
|
||||||
response.write(",")
|
response.write(",\n")
|
||||||
});
|
});
|
||||||
response.write(JSON.stringify({title: "$:/config/tiddlyweb/host",text: "$protocol$//$host$$pathname$/"}));
|
response.write(JSON.stringify({title: "$:/config/tiddlyweb/host",text: "$protocol$//$host$$pathname$/"}));
|
||||||
response.write(",")
|
response.write(",\n")
|
||||||
response.write(template.substring(markerPos + marker.length))
|
response.write(template.substring(markerPos + marker.length))
|
||||||
// Finish response
|
// Finish response
|
||||||
response.end();
|
response.end();
|
||||||
|
Loading…
Reference in New Issue
Block a user