pwa-asset-generator icon indicating copy to clipboard operation
pwa-asset-generator copied to clipboard

The contents of links' href attributes are encoded

Open DmitryEfimenko opened this issue 1 year ago • 0 comments

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 avatar Apr 26 '23 15:04 DmitryEfimenko