Aspnetcore: Script innertext is mangled when type="text/html"

Created on 22 Jul 2019  路  3Comments  路  Source: dotnet/aspnetcore

Describe the bug

When having a script tag with the attribute type="text/html" the parser breaks whatever is contained within when <% and == can be found

To Reproduce

Steps to reproduce the behavior:

  1. Using this version of ASP.NET Core 3.0.100-preview6-012264
  2. Run this code inside any .cshtml file
<script type="text/html">
    <%var x = window == null;%>
</script>
  1. With these arguments: none necessary
  2. Result:
<script type="text/html">
    <%var x = window =>
</script>

Expected behavior

Expected behavior is for the value within the script tag to not be altered.

Done area-mvc bug

Most helpful comment

@Buildstarted! Where have you been!?

All 3 comments

@Buildstarted! Where have you been!?

I've been on the jabbr slack. I tried to connect to the asp slack a few times but always got errors so I gave up.

@ajaybhargavb can you please look into this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zorthgo picture zorthgo  路  136Comments

Rast1234 picture Rast1234  路  104Comments

pekkah picture pekkah  路  200Comments

rmarinho picture rmarinho  路  78Comments

barrytang picture barrytang  路  89Comments