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

The quotation marks will be incorrectly escaped as " in application/ld+json. #365

Open
5 tasks done
YunTaoLin opened this issue Jul 20, 2023 · 0 comments
Open
5 tasks done

Comments

@YunTaoLin
Copy link

YunTaoLin commented Jul 20, 2023

Describe the bug

I am going to perform SSG on the following code:

<component :is="'script'" type="application/ld+json">{{ jsonld }}</component>

But the following code was generated.
This will affect the result of Google analyze structured data, causing the structured data to be unanalyzable.

<script type="application/ld+json">
{
    {&quot;@context{&quot;: {&quot;https://schema.org{&quot;,
    {&quot;@type{&quot;: {&quot;BreadcrumbList{&quot;,
    {&quot;itemListElement{&quot;: [
      {
        {&quot;@type{&quot;: {&quot;ListItem{&quot;,
        {&quot;position{&quot;: 1,
        {&quot;item{&quot;: {
          {&quot;@id{&quot;: {&quot;https://example.com/home/en{&quot;,
          {&quot;name{&quot;: {&quot;Online Tools List{&quot;,
          {&quot;description{&quot;: {&quot;Be Good Tool&#39;s online list collect many kinds of convenient and easy-to-use online tools, all of which can be used for free, including online lottery, online wheel game, generator, computer, and update various memes from time to time, join us now!{&quot;
        }
      },
      {
        {&quot;@type{&quot;: {&quot;ListItem{&quot;,
        {&quot;position{&quot;: 2,
        {&quot;item{&quot;: {
          {&quot;@id{&quot;: {&quot;https://example.com/youtube-picker/en{&quot;,
          {&quot;name{&quot;: {&quot;Youtube Comment Sweepstakes Tool{&quot;,
          {&quot;description{&quot;: {&quot;The Youtube comment sweepstakes tool only needs to simply enter the URL of the video to get all the comments of the video. The organizer can set various filtering conditions, such as date range, length of comments, and filtering of repeated comments. It is definitely a good helper for video creators to hold events{&quot;
        }
      }
    ]
  }
                </script>

Reproduction

vite-ssg build

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics
    Memory: 4.31 GB / 15.39 GB
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (114.0.1823.82)
    Internet Explorer: 11.0.22000.120

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
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

No branches or pull requests

1 participant