Script tags are executed when switching out of codeview
See original GitHub issueIf the user puts script tags into the codeview, the scripts are executed when trying to switch back to WYSIWYG. This happens for both inline scripts, e.g. <script>alert('test');</script>
and external ones, e.g. <script src="http://path/to/foo.js"></script>
.
It has the side effect of also trapping the user in the codeview if they enter some invalid JS. I came across this while trying to test my own input sanitization by putting <script>test</script>
into the codeview since all I was trying to do was make sure that my HTML cleaning was stripping script tags out, and it trapped me in the codeview with the JS error: Uncaught ReferenceError: test is not defined
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Summernote editor and script tags - Stack Overflow
What I'd like to do is, in the preview/WYSIWYG mode, instead of having the script being executed, just display an image (or text)...
Read more >Everything I Know About The Script Tag - Eager Blog
A script tag can either include the JavaScript directly, or it can point to a URL where the script should be loaded from....
Read more >Introduction to JavaScript CSCI 2910-001 In-Class Exercise
</script> tags that we discussed in class. A browser executes the scripts in the order that that are encountered within the file: scripts...
Read more >1 Getting Started With OpenScript - Oracle Help Center
Users can use the Tree View graphical scripting interface for creating and editing scripts through the UI. Users can also switch to the...
Read more >Markdown editing with Visual Studio Code
This allows script execution and also allows content to be loaded over http . Markdown extensions. In addition to the functionality VS Code...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update on this issue?
Try this one
https://github.com/aungkyawhtay/script-share