Skip to content

Double quoted font-names break style attribute when the target element already has an inline style #392

@tborg

Description

@tborg

Hi! Thank you for this excellent library.

I wanted to revisit #333 — this problem arose for us under a very specific circumstance: when the font family is inlined into an element that already has an inline style. Here is a minimal repro that will demonstrate the problem in the playground:

<html>
  <head>
    <style>.text { font-family: "Segoe UI"; }</style>
  </head>
  <body>
    <span class="text" style="whitespace:nowrap">Big Text</span>
  </body>
</html>

results in output like this:

<html><head>
    
  </head>
  <body>
    <span class="text" style="font-family: "Segoe UI";whitespace: nowrap">Big Text</span>
  
</body></html>

Maybe the reason why will be immediately obvious to you — otherwise, if you can give me a pointer on where to get started I could take a crack at it.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions