diff --git a/compiler.md b/compiler.md index be5735f..753766b 100644 --- a/compiler.md +++ b/compiler.md @@ -79,6 +79,8 @@ riot.inject(code, 'my-tag', './my-tag.html') riot.mount('my-tag') ``` +Note that `.innerHTML` will turn ampersands `&` within your template to HTML entities `&` which will break the compiler. To avoid that for tags with attribute expressions like `
...
` you can simply replace with `el.innerHTML.replace(/&/g, '&')`. + ## Pre-compilation The Compilation phase is asynchronous and it will not block your application rendering. However you should use the browser compilation only for prototyping or for quick experiments.