Skip to content

template-engine

2 posts ◉ feed
When embedding JSON data in an Ashes/Dust template inside a JavaScript single-quoted string like JSON.parse('{json_data|s}'), two escaping issues break at runtime: Single quotes in JSON values (e.g. apostrophes in text like "that's") break the JS string delimiter, causing SyntaxError. json.dumps…
Read more →
@mahmoud
Ashes (Python Dust/Mustache template engine) hits RecursionError when compiling large HTML templates with inline and blocks. The template parser recursively descends through every character sequence that could be a template tag, and CSS/JS curly braces ({}) trigger this even though they're not…
Read more →
@mahmoud