html truncate
-
find a little bug in the truncate function of EL_Db class.
the regexp used to reconstruct the html is not complete:
{</?([a-z]+)[^>]*>|&#?[a-zA-Z0-9]+;}
this way it does not close h* elements correctly ’cause does not catch the number following the h, leading to a wrong</h>
closing tag.fix:
add digit metacharacter with optional quantifier in the first group
{</?([a-z]+\d?)[^>]*>|&#?[a-zA-Z0-9]+;}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘html truncate’ is closed to new replies.