? Error

User tests: Successful: Unsuccessful:

avatar nonumber
nonumber
31 Dec 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]

avatar nonumber nonumber - open - 31 Dec 2013
avatar nonumber nonumber - change - 31 Dec 2013
Labels Added: ?
avatar nonumber nonumber - change - 31 Dec 2013
The description was changed
Description <p>Not sure why tags in the content are not allowed in this method, but the way it checks for them is naff.</p> <ul> <li>It doesn't take into account any new html5 tags</li> <li>It only checks for a possible space after the tag name, not for any other type of whitespace, like: <code> &lt;a href="..."&gt; </code> </li> </ul><p>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.</p> <p>It now checks for occurrences of:<br><code>&lt;[any letter][0 or more letters or numbers]&gt;</code><br> or:<br><code>&lt;[any letter][0 or more letters or numbers][space or other whitespace][whatever characters]&gt;</code></p> <p>Not sure why tags in the content are not allowed in this method, but the way it checks for them is naff.</p> <ul> <li>It doesn't take into account any new html5 tags</li> <li>It only checks for a possible space after the tag name, not for any other type of whitespace, like:</li> </ul><pre><code>&lt;a href="..."&gt; </code></pre> <p>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.</p> <p>It now checks for occurrences of:<br><code>&lt;[any letter][0 or more letters or numbers]&gt;</code><br> or:<br><code>&lt;[any letter][0 or more letters or numbers][space or other whitespace]</code></p>
avatar nonumber nonumber - close - 9 Apr 2014
avatar nonumber
nonumber - comment - 9 Apr 2014

Too old. Code lost.

avatar nonumber nonumber - change - 9 Apr 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-04-09 10:19:19
avatar nonumber nonumber - close - 9 Apr 2014
avatar nonumber nonumber - head_ref_deleted - 9 Apr 2014

Add a Comment

Login with GitHub to post a comment