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

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

Closed
movsb opened this issue Mar 6, 2018 · 0 comments · Fixed by #1135
Closed

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

movsb opened this issue Mar 6, 2018 · 0 comments · Fixed by #1135

Comments

@movsb
Copy link

movsb commented Mar 6, 2018

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.

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

Successfully merging a pull request may close this issue.

1 participant