Title: html truncate
Last modified: August 21, 2016

---

# html truncate

 *  Resolved [veonline](https://wordpress.org/support/users/veonline/)
 * (@veonline)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/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]+;}
 * [https://wordpress.org/plugins/event-list/](https://wordpress.org/plugins/event-list/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [mibuthu](https://wordpress.org/support/users/mibuthu/)
 * (@mibuthu)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/html-truncate/#post-4609348)
 * Thanks for the info and the solution to solve the problem.
    I have included the
   changes in the develop version now, so it will be fixed in the next version.

Viewing 1 replies (of 1 total)

The topic ‘html truncate’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/event-list_f8f8f8.svg)
 * [Event List](https://wordpress.org/plugins/event-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/event-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/event-list/)
 * [Active Topics](https://wordpress.org/support/plugin/event-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-list/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [mibuthu](https://wordpress.org/support/users/mibuthu/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/html-truncate/#post-4609348)
 * Status: resolved