W3C home > Mailing lists > Public > www-validator@w3.org > February 2018

RE: Bug report / Question on "Error: JS: SyntaxError: Invalid range in character class."

From: O'Guin, Phaewryn <JDO09280@ccv.vsc.edu>
Date: Tue, 20 Feb 2018 22:04:21 +0000
To: Luis Garcia <lgarcia@ebcomm.mx>, "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <DM2PR0101MB0925AE86DB78294D6773E021CCCF0@DM2PR0101MB0925.prod.exchangelabs.com>
Probably an issue at a regex line such as seen at “var product_price_regex_numeric=/[^\d.-]+/g;$("input[type='text']” in your code, as you need to escape the hypen or it reads it as a range instead of as intended. “within a character class, you can place a hyphen as the first or last character in the range (e.g. [-a-z] or [0-9-]), OR escape it (e.g. [a-z\-0-9]) in order to add ‘hyphen’ to your class” from https://stackoverflow.com/questions/9589074/regex-should-hyphens-be-escaped


Phaewryn (J.D.) O’Guin


From: Luis Garcia [mailto:lgarcia@ebcomm.mx]
Sent: Monday, February 19, 2018 5:06 PM - 17:06 PM
To: www-validator@w3.org
Subject: Bug report / Question on "Error: JS: SyntaxError: Invalid range in character class."


I check my sites on a regular basis in https://validator.w3.org, this tool has helped me reducing html5 errors to zero, thank you so much!

But starting this week, i got a strange error:

Error: JS: SyntaxError: Invalid range in character class.


With no extra input on the error itself, i don't know what to do. But i think is some kind of new feature on the validator because before that the site performed well on the validator (all green). These sites has the same behavior:




Can you help me with that? if you need more information please let me know.

I attach a pdf with the results for the site https://tigretienda.com/

Luis García

(image/jpeg attachment: image001.jpg)

Received on Tuesday, 20 February 2018 22:04:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:00:03 UTC