Export issues with a script within a HTML block, a bug?

I've wanted a small number countdown in within one of my projects, instead of reworking the syntax to make it work with the Hype syntax, I've instead created a rectangle and did the html, styling and script within that block.

When I preview the banner it works exactly as intended, however when i'm exporting the banner it comes with some error codes almost like there are tags that aren't closed. When I remove the script tags and parts from the html block it works fine with exporting, so something with adding JS in an html block messes up with the export.

The rectangle with inserted html and js:

Once its exported with any of the export scripts:

Could this be a bug, or is there something I'm missing with adding script tags in an html block?

It sounds like you're hitting a known issue where using the the "Inline Data File + Loader" option doesn't work correctly with <script> tags. This option is in Advanced Export but also turned on with export scripts. This is on our list to fix.

You're welcome to send me the document you're working on and the export script, along with the error you see (so I can verify that is what I'm reproducing), but I'm pretty sure that is it.

I'd recommend including the script section in an on scene load handler or place like that instead.

1 Like