Skip to content
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

Check for invalid characters in tag names #146

Closed
wants to merge 3 commits into from
Closed

Check for invalid characters in tag names #146

wants to merge 3 commits into from

Conversation

shanavas786
Copy link

Check if any invalid characters other than [\w\-:] present in tag names. For that even tags with invalid characters need to be identified as starting tags (already handles ending tags).

Shanavas M added 3 commits May 31, 2016 19:05
Detect starting tags with invalid characters also.
Check if tag names contain any characters other than
`[\w\-:]`
@shanavas786 shanavas786 changed the title Check for invalid characters in tags Check for invalid characters in tag names May 31, 2016
@coveralls
Copy link

coveralls commented May 31, 2016

Coverage Status

Coverage increased (+0.02%) to 98.75% when pulling 89988c8 on shanavas786:patch-specialchars into 152a114 on yaniswang:master.

@Shinigami92
Copy link
Contributor

In my opinion, we should solve this in another way
possibly this can be combined with the rule tag-pair or tagname-lowercase
or better, we should create a rule no-invalid-tag

@thedaviddias thedaviddias changed the base branch from master to develop August 27, 2018 01:00
@thedaviddias thedaviddias added enhancement Functionality that enhances existing features PR needed help wanted We are looking for community help labels Aug 27, 2018
@damanm24 damanm24 self-requested a review February 23, 2019 23:21
@damanm24 damanm24 self-assigned this Feb 23, 2019
@damanm24 damanm24 removed their request for review February 23, 2019 23:21
@damanm24
Copy link
Contributor

See (#329) for updated PR. Closing this PR.

@damanm24 damanm24 closed this Feb 23, 2019
damanm24 pushed a commit to damanm24/HTMLHint that referenced this pull request Feb 24, 2019
thedaviddias pushed a commit that referenced this pull request Feb 24, 2019
…331)

**Fixes**: #

🚨 Please review the [guidelines for contributing](CONTRIBUTING.md) and our [code of conduct](../CODE_OF_CONDUCT.md) to this repository. 🚨
**Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:**

- [x] Check the commit's or even all commits' message styles matches our requested structure.
- [x] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:
Added rule to check for special characters in tag name. See (#146)
#### Proposed changes:

## -

-

👍 Thank you!
damanm24 pushed a commit to damanm24/HTMLHint that referenced this pull request Feb 24, 2019
fix(htmlhint): added rule for special characters in tag name (htmlhint#146) (…
@shanavas786 shanavas786 deleted the patch-specialchars branch February 25, 2019 09:20
thedaviddias pushed a commit that referenced this pull request Feb 1, 2020
…331)

**Fixes**: #

🚨 Please review the [guidelines for contributing](CONTRIBUTING.md) and our [code of conduct](../CODE_OF_CONDUCT.md) to this repository. 🚨
**Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:**

- [x] Check the commit's or even all commits' message styles matches our requested structure.
- [x] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:
Added rule to check for special characters in tag name. See (#146)
#### Proposed changes:

## -

-

👍 Thank you!
thedaviddias added a commit that referenced this pull request May 13, 2020
* fix: missing test cases (#327)

**Fixes**: #325 

- [x] Check the commit's or even all commits' message styles matches our requested structure.
- [x] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:
In the original pull request some of the test cases were missing. Added --recursive option for mocha to check for all individual rules.

* feat(htmlhint): add new rule for whitespace in attributes (#310) (#322)

* 0.10.3

* feat(htmlhint): add new rule for whitespace in attributes (#310)

* fix(htmlhint): removed unnecessary code (#310)

* 0.11.0

* Revert "Merge branch 'develop' into attr-whitespace"

This reverts commit 35988c1, reversing
changes made to 981cca7.

* Revert "Revert "Merge branch 'develop' into attr-whitespace""

This reverts commit cfa794d.

* chore(htmlhint): rebuilt package.json

* chore(htmlhint): updated rule to use ES6

* 0.10.3

* 0.11.0

* fix(htmlhint): made change to test cases and index.js

* html.js (#304)

This is a new formatter which logs error messages in html format on console as well as it will generate a report file in html format

**Fixes**: #

🚨 Please review the [guidelines for contributing](CONTRIBUTING.md) and our [code of conduct](../CODE_OF_CONDUCT.md) to this repository. 🚨
**Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:**

- [x] Check the commit's or even all commits' message styles matches our requested structure.
- [x] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:
New formatter

#### Proposed changes:
New formatter

## -

-

👍 Thank you!

* fix(htmlhint): added rule for special characters in tag name (#146) (#331)

**Fixes**: #

🚨 Please review the [guidelines for contributing](CONTRIBUTING.md) and our [code of conduct](../CODE_OF_CONDUCT.md) to this repository. 🚨
**Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:**

- [x] Check the commit's or even all commits' message styles matches our requested structure.
- [x] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:
Added rule to check for special characters in tag name. See (#146)
#### Proposed changes:

## -

-

👍 Thank you!

* fix(htmlhint): added rule for quotes around attribute values (#147) (#333)

* fix(htmlhint): add ability to pass regexp in config (#328)

Based on #238

Add ability to pass regexp in `.htmlhintrc` file for matching attributes value.

Example:
```js
...
"id-class-value": {
    "regId": "^[a-z\\d]+([-_]+[a-z\\d]+)*$",
    "message": "The id and class attribute values must be in lowercase and split by dash or underscore"
},
...
```

Problem was in parsing config file by `JSON.parse`. We can not correct pass `regexp` into json schema. Only `string`. And this `string` after parsing is `string` too.

I just check input data. If it is not regexp then create `new RegExp` instance from input string.

**Fixes**: #

🚨 Please review the [guidelines for contributing](CONTRIBUTING.md) and our [code of conduct](../CODE_OF_CONDUCT.md) to this repository. 🚨
**Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:**

- [ ] Check the commit's or even all commits' message styles matches our requested structure.
- [ ] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:

#### Proposed changes:

## -

-

👍 Thank you!

* feat(htmlhint): added attribute sorting (#309) (#332)

**Fixes**: #

🚨 Please review the [guidelines for contributing](CONTRIBUTING.md) and our [code of conduct](../CODE_OF_CONDUCT.md) to this repository. 🚨
**Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your PR:**

- [ ] Check the commit's or even all commits' message styles matches our requested structure.
- [ ] Check your code additions will fail neither code linting checks nor unit test.

#### Short description of what this resolves:
Added sort feature for tag attributes.
#### Proposed changes:
-
## -

-

👍 Thank you!

* Used Object.keys instead of Object.values (#344)

Used Object.keys instead of Object.values because it is not supported by nodejs before v8.

* Create FUNDING.yml (#350)

* updates URLs in repository and bugs in package.json (#354)

* chore: update commitizen and semantic release (#357)

* feat(htmlhint): add RegExp and regex string (#346)

RegExp and regex string can be used in whitelist now!
related to #228 #183 microsoft/vscode-htmlhint#34

* update links back to htmlhint.com (#359)

Co-authored-by: Zhixing Zhang <account@neoto.xin>
Co-authored-by: Daman Mulye <dmulye2@illinois.edu>
Co-authored-by: nmanupuri <39561219+nmanupuri@users.noreply.github.com>
Co-authored-by: orangewit3 <43012690+orangewit3@users.noreply.github.com>
Co-authored-by: meetDeveloper <32453612+meetDeveloper@users.noreply.github.com>
Co-authored-by: Christian Oliff <christianoliff@yahoo.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Functionality that enhances existing features help wanted We are looking for community help PR needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants