Skip to content

The contents of links' href attributes are encoded #996

@DmitryEfimenko

Description

@DmitryEfimenko

Describe the bug
When index.html file is updated, the & in the link's href attribute is updated to &

To Reproduce
Steps to reproduce the behavior:

  1. Ensure that your index.html file has:
    <link
       href="https://fonts.googleapis.com/css?family=Material+Icons|Roboto:wght@300;400;500&display=swap"
       rel="stylesheet"
    />
  2. Execute cli command npx pwa-asset-generator path\to\icon.png path\to\icons --index path\to\index.html
  3. Open index.html
  4. Observe the link got changed to:
    <link
       href="https://fonts.googleapis.com/css?family=Material+Icons|Roboto:wght@300;400;500&amp;display=swap"
       rel="stylesheet"
    />

Expected behavior
The & should not be encoded in href attributes.

If you navigate to both URLs, and compare contents, you'll see that the one that does not have encoding is the right one.

System (please complete the following information):

  • OS: windows 10
  • node version: v18.10.0
  • npm version: 8.19.2
  • cli version: 6.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexternal-dependencyProcess is blocked by external dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions