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

Can't parse element attribute without quotes #1237

Open
Tracked by #8
SettingDust opened this issue Jan 25, 2024 · 0 comments
Open
Tracked by #8

Can't parse element attribute without quotes #1237

SettingDust opened this issue Jan 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SettingDust
Copy link

Describe the bug
<script type=application/ld+json> transform to <script type="application/ld" json="">

https://html.spec.whatwg.org/multipage/syntax.html#attributes-2

To Reproduce
Parse below string

`
      <html><head>
        <script type='application/ld+json'>{
          "@context": "https://schema.org",
          "@type": "NewsArticle",
          "headline": "headline",
          "@graph": [{
            "headline": "Nested headline"
          }]
        }</script></head></html>`

Expected behavior
Parsable the standard

Screenshots
图片

Device:

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Node.Js 20
  • Version [e.g. 22] 13.3.1
@SettingDust SettingDust added the bug Something isn't working label Jan 25, 2024
jacobbuck added a commit to jacobbuck/dom-parse that referenced this issue Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant