-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Parenthesis and asterisk trigger parsing errors #100
Comments
HTMLHint only support HTML code, your angular code is template, no supported. |
Same problem in Polymer when using $ in attribute name:
<div id$="[[myId]]">
<content></content>
</div> |
Taken from the W3C HTML specification :
Following this rule, the code |
+1 We would need this as well. |
+1 |
Hi @yaniswang , The issue is with the regular expression at: https://github.com/yaniswang/HTMLHint/blob/master/src/htmlparser.js#L36-L38 If we could make them unicode aware, we would solve the issue. There are already projects working with regular expression and unicode like https://github.com/slevithan/xregexp What do you think about this approach? |
+1 |
+1:+1: |
This is a serious bug... In a nutshell HTMLHint throwing errors on valid HTML. Can we please get a fix for this? |
I totally agree @felixfbecker |
Instead of whitelisting characters here /\s*([\w\-:]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/ it should use an inverted character class that includes anything but /\s*([^"'>/=\0\s]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/ Element tag names are not affected (see W3C) |
Fixes htmlhint#100 See W3C HTML specification: http://www.w3.org/TR/html-markup/syntax.html#syntax-attributes
Made a PR |
Fixes htmlhint#100 See W3C HTML specification: http://www.w3.org/TR/html-markup/syntax.html#syntax-attributes
Fixes htmlhint#100 See W3C HTML specification: http://www.w3.org/TR/html-markup/syntax.html#syntax-attributes
Fixed now: b6a4d1a |
加上jsp语法吧, 我们很多页面都是用jsp写的。。。 |
Angular 2 introduces a new syntax for attributes which can lead to this :
This is plain valid HTML but it triggers those 2 errors :
The text was updated successfully, but these errors were encountered: