Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live preview is removing script tags #18

Open
jkevingutierrez opened this issue Aug 5, 2020 · 1 comment
Open

Live preview is removing script tags #18

jkevingutierrez opened this issue Aug 5, 2020 · 1 comment

Comments

@jkevingutierrez
Copy link
Contributor

jkevingutierrez commented Aug 5, 2020

Livepreview is removing all the script tags in the generated HTML. (https://github.com/KalobTaulien/wagtail-livepreview/blob/master/livepreview/static/livepreview/js/livepreview_fe.js#L4)

Javascript could be used to position elements, to apply CSS styles, to add lazy loading, etc. Removing all the scripts from the page could greatly affect the view of the page (even for simple sites that don't use any JS framework).

It would be great to stop removing all the script tags in the HTML, as this can affect the preview of the pages.

Maybe the stripScripts function should only remove the scripts inside the div with the class js-livepreview-script?

@urmauur
Copy link

urmauur commented May 5, 2021

The same issue, anyone resolves this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants