The quotation marks will be incorrectly escaped as " in application/ld+json.
YunTaoLin opened this issue · 0 comments
YunTaoLin commented
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">
{
{"@context{": {"https://schema.org{",
{"@type{": {"BreadcrumbList{",
{"itemListElement{": [
{
{"@type{": {"ListItem{",
{"position{": 1,
{"item{": {
{"@id{": {"https://example.com/home/en{",
{"name{": {"Online Tools List{",
{"description{": {"Be Good Tool'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!{"
}
},
{
{"@type{": {"ListItem{",
{"position{": 2,
{"item{": {
{"@id{": {"https://example.com/youtube-picker/en{",
{"name{": {"Youtube Comment Sweepstakes Tool{",
{"description{": {"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{"
}
}
]
}
</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.