mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-05 23:10:28 +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));
|
||||
$tw.utils.each(recipeTiddlers,function(recipeTiddlerInfo) {
|
||||
response.write(JSON.stringify($tw.sqlTiddlerStore.getRecipeTiddler(recipeTiddlerInfo.title,recipe_name).tiddler));
|
||||
response.write(",")
|
||||
response.write(JSON.stringify($tw.sqlTiddlerStore.getRecipeTiddler(recipeTiddlerInfo.title,recipe_name).tiddler).replace(/</g,"\\u003c"));
|
||||
response.write(",\n")
|
||||
});
|
||||
response.write(JSON.stringify({title: "$:/config/tiddlyweb/host",text: "$protocol$//$host$$pathname$/"}));
|
||||
response.write(",")
|
||||
response.write(",\n")
|
||||
response.write(template.substring(markerPos + marker.length))
|
||||
// Finish response
|
||||
response.end();
|
||||
|
Loading…
Reference in New Issue
Block a user