dotnet / dotnet/aspnetcore

Invalid type rendering for <script type="application/ld+json"> renders as type="application/ld&#x2B;json"

Open
#61,718 2 comments 3 reactions 0 assignees View on GitHub
area-mvc
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

In an `ASP.NET Core MVC app` on `.NET 9` the `script` tag `type` invalid renderers a `backslash+`

```xml

{}

```

Is rendered as

```xml

  {}

```

See screenshot below.

![Image](https://github.com/user-attachments/assets/248bb95f-fec7-4277-9903-e0e8ee0ef676)

It works correct on `NET8`

### Expected Behavior

_No response_

### Steps To Reproduce

This should be the output

```xml

{}

```

### Exceptions (if any)

_No response_

### .NET Version

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.