Skip to content

script inside a div is escaped even if sanitize set to false #1134

Closed

Description

@movsb

Marked version:
0.3.17+
Markdown flavor: Markdown.pl|CommonMark|GitHub Flavored Markdown|n/a
gfm

214468b

Expectation

<div>
  <script>
    alert('test');
  </script>
</div>

Result

<div>
  <script>
    alert(&#39;test&#39;);
  </script>
</div> 

What was attempted

<div>
  <script>
    alert('test');
  </script>
</div>

If I move the script tag outside the div tag, it will work.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions