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

Feature Request: Ability to disable execution of <script> tags #1492

Open
SaDaT895 opened this issue Oct 21, 2024 · 1 comment
Open

Feature Request: Ability to disable execution of <script> tags #1492

SaDaT895 opened this issue Oct 21, 2024 · 1 comment

Comments

@SaDaT895
Copy link

SaDaT895 commented Oct 21, 2024

We want the user to view, edit and add <script> tags but not be able to execute them on preview.

It could lead to some situations like:

Screenshot 2024-10-21 at 15 31 58

How to reproduce?

Navigate to: https://alex-d.github.io/Trumbowyg/demos/

  • Switch to source-formatting and insert: <script>var dteNow = new Date(); var intYear = dteNow.getFullYear(); document.write(intYear);</script>
  • Switch back to preview
@Alex-D
Copy link
Owner

Alex-D commented Jan 29, 2025

I think it's not that easy to do without issues ^^'
One way could be to replace script tags with something else, only in the view, but keep it in the textarea, which means some transformations between the two, which Trumbowyg doesn't do today.

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

No branches or pull requests

2 participants