mounirlamouri / manifest-validator

Web Manifest Validator
https://manifest-validator.appspot.com
Apache License 2.0
29 stars 9 forks source link

Incorrect validation of "src" key in the "icons" array #40

Open dandv opened 8 years ago

dandv commented 8 years ago

The following manifest will validate successfully:

{
  "name": "My Progressive Web App",
  "short_name": "My PWA",
  "icons": [{
        "src": "images/touch/icon-72x72.png",
        "sizes": "72x72",
        "type": "image/png"
      }, {
        "href": "images/touch/icon-96x96.png",
        "sizes": "96x96",
        "type": "image/png"
      }, {
        "src": "images/touch/icon-128x128.png",
        "sizes": "128x128",
        "type": "image/png"
      }],
  "background_color": "#40455f",
  "display": "standalone",
  "theme_color": "#53b50a",
  "start_url": "/?homescreen=1"
}

Note the second element of the icons array. The key "href" should be "src". This led to a hard to debug issue because of this bug in Chrome.

CC @slightlyoff

marcoscaceres commented 8 years ago

We should be more aggressive about warning about unprefixed nonstandard keys.

On 21 Oct. 2016, at 11:32 am, Dan Dascalescu notifications@github.com wrote:

The following manifest will validate successfully:

{ "name": "Trulia Progressive Web App", "short_name": "Trulia PWA", "icons": [{ "src": "images/touch/icon-72x72.png", "sizes": "72x72", "type": "image/png" }, { "href": "images/touch/icon-96x96.png", "sizes": "96x96", "type": "image/png" }, { "src": "images/touch/icon-128x128.png", "sizes": "128x128", "type": "image/png" }], "background_color": "#40455f", "display": "standalone", "theme_color": "#53b50a", "start_url": "/?homescreen=1" } Note the second element of the icons array. The key "href" should be "src". This led to a hard to debug issue because of this bug in Chrome.

CC @slightlyoff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.