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

Fix html tag check in content #2744

Closed
wants to merge 3 commits into from
Closed

Fix html tag check in content #2744

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 31, 2013

Not sure why tags in the content are not allowed in this method, but the way it checks for them is naff.

  • It doesn't take into account any new html5 tags
  • It only checks for a possible space after the tag name, not for any other type of whitespace, like:
<a
    href="...">

The solution is to simply check for any possible tag using regular expressions. Is a lot faster too than checking for every single tag of that long array separately.

It now checks for occurrences of:
<[any letter][0 or more letters or numbers]>
or:
<[any letter][0 or more letters or numbers][space or other whitespace]

@ghost
Copy link
Author

ghost commented Apr 9, 2014

Too old. Code lost.

@ghost ghost closed this Apr 9, 2014
@ghost ghost deleted the patch-2 branch April 9, 2014 10:20
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants