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

BUG: SetComponent() encodes anything in <script> tags #3620

Closed
jamesshin5 opened this issue Jul 13, 2021 · 5 comments
Closed

BUG: SetComponent() encodes anything in <script> tags #3620

jamesshin5 opened this issue Jul 13, 2021 · 5 comments
Labels

Comments

@jamesshin5
Copy link

jamesshin5 commented Jul 13, 2021

When loading in HTML through setComponent, quotation marks turn into "&quot" and less than signs turn into "&lt".

Any help would be greatly appreciated!

@artf
Copy link
Member

artf commented Jul 28, 2021

Thanks @jamesshin5 that will be fixed in the next release.

@artf artf added the bug label Jul 28, 2021
@artf artf closed this as completed in 78e36a3 Jul 28, 2021
@jamesshin5
Copy link
Author

thanks so much for this! when do you think the next release will be? I did a workaround of just adding a component with script to canvas but want to change back asap

@artf
Copy link
Member

artf commented Jul 31, 2021

I hope really soon but can't tell the exact day. In case it might be useful, we auto-tweet new releases on our twitter account: https://twitter.com/grapesjs

@jamesshin5
Copy link
Author

Thanks artf, the script tag content isnt being encoded anymore.

but when I use setComponent or the import button to import script, it isn't reflected on the canvas ie. if I have a component that requires some script like a tabs view, if i import that html and js with setComponent(), the tabs are not working / switching the view.

When exporting this html/js it works perfectly fine, is there something I should be doing so that imported script is in effect inside the canvas. acceptScript is already true

@artf
Copy link
Member

artf commented Aug 10, 2021

@jamesshin5 that will be fixed in the next release

felixx-kreebox pushed a commit to kreeboxvn/grapesjs that referenced this issue Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants