diff --git a/tools/lint/lib/checks/esid.py b/tools/lint/lib/checks/esid.py index cdfcac667845a8d7205e484851818c25c244ff61..fbe1f4fc41e9daa5989612e02ae9656e9ace0bfc 100644 --- a/tools/lint/lib/checks/esid.py +++ b/tools/lint/lib/checks/esid.py @@ -8,11 +8,12 @@ class CheckEsid(Check): def __init__(self): #self.es5idRegex = re.compile(r"^S?(B|\d+)(\.\d+)+(-(\d+|[a-z]|i+))*(_A\d(\.\d+)?(_T\d(\.\d+)?)?)?$") self.es6idRegex = re.compile(r"^(S?(B|\d+)(\.\d+)+(((_A\d\.\d)?_T?\d)|[ _]S\d+(\.[a-z])*)?(, |$))+") - # Simpliiied version of the WhatWG URL specification for fragment - # parsing + # Simplified version of the WhatWG URL specification for fragment + # parsing: # https://url.spec.whatwg.org/#fragment-state + # However, that must also include "%" self.esidRegex = re.compile( - u"^[a-z0-9!$&'()*+,\-./:;=?@_~\u00a0-\U0010fffd]+$", re.IGNORECASE + u"^[a-z0-9!$%&'()*+,\-./:;=?@_~\u00a0-\U0010fffd]+$", re.IGNORECASE ) def run(self, name, meta, source): diff --git a/tools/lint/test/fixtures/valid_esid_alternate.js b/tools/lint/test/fixtures/valid_esid_alternate.js index f079a22a091b8151cd28f9e1728ad24e10c10d42..2b9a5fe7115b1f12f612926391f8818afd6a07ef 100644 --- a/tools/lint/test/fixtures/valid_esid_alternate.js +++ b/tools/lint/test/fixtures/valid_esid_alternate.js @@ -2,7 +2,7 @@ // Copyright (C) 2017 Mike Pennisi. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: use-strict-directive!@$&*()_+ +esid: use-strict-directive!@$%&*()_+ description: Minimal test ---*/