I’ve upgraded a site from Grav1.6 to Grav1.7. In some pages I have custom javascript in script tags in page.md. This works fine in 1.6, but in 1.7 it seems to wrap the js in <![CDATA[ ]] and does not work. Any ideas?
Carl
1 Like
@cleblond, I cannot reproduce the issue using Grav 1.7.28 when embedding the following inside page Typography:
<script>
alert('Hello world!');
</script>
it seems to wrap the js in <![CDATA]
Does it seem to be so, or do you know it is so? I haven’t seen that behaviour before.
- Did you read the Upgrade docs?
- Which theme are your using? Many (most) themes are not 1.7 compatible with respect to auto-escaping. See Most Common Issues and Twig.
It’s definitely wrapping in CDATA. I get console error (Uncaught SyntaxError: Unexpected token ‘<’) from the <![CDATA[ ]] and it there when I inspect. I’m using the learn-git-sync theme. I’ve read the upgrade docs. I’ll have another look.
@cleblond, Theme Learn2 Git Sync is compatible with Grav 1.7 with respect to Twig auto-escape.
I haven’t tested other aspects.
Thanks @anon76427325. When I disabled the tinymce editor integration the problem went away. Odd that this didn’t occur in 1.6.
1 Like