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 contents of links' href attributes are encoded #996

Open
DmitryEfimenko opened this issue Apr 26, 2023 · 0 comments
Open

The contents of links' href attributes are encoded #996

DmitryEfimenko opened this issue Apr 26, 2023 · 0 comments
Labels
bug Something isn't working needs verification Bug needs to be verified with reproduction

Comments

@DmitryEfimenko
Copy link

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
@DmitryEfimenko DmitryEfimenko added bug Something isn't working needs verification Bug needs to be verified with reproduction labels Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs verification Bug needs to be verified with reproduction
Projects
None yet
Development

No branches or pull requests

1 participant