While experimenting with something, I attempted to insert the following code into Showdown:
<script>alert("hacked!");</script>
Naturally, no alert appeared (as Showdown is designed to prevent such actions), but the <script>
tag was completely removed. Since this is for a user description, I need the script tag and its contents to be visible but not executed.
I contemplated modifying some of Showdown's built-in code to achieve this, but couldn't pinpoint where in the source code I should make changes to only display the script tags without executing them.
If anyone has any suggestions or knows of existing options for accomplishing this, please let me know!