question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Script tags are executed when switching out of codeview

See original GitHub issue

If 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

summernote-script summernote-js2

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

22reactions
alansongcommented, Aug 25, 2016

Any update on this issue?

3reactions
aungkyawhtaycommented, Sep 21, 2018
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found