[Plugin: Hackadelic Table Of Contents Boxes] Extra tags within <h> tags unstripped – patch inc
-
Here’s the solution to the 2nd problem I found with TOC Boxes. The problem is that if tags are included within the
<hN>
tags, by mistake or on purpose, they are not stripped from the TOC elements, thus modifying the TOC look with unwanted extra tags.For example, I found my own blog posts that had
<strong>
and even<img>
tags within the<hN>
.Feel free to integrate this patch for v 1.5.1 into trunk:
Index: wp-content/plugins/hackadelic-table-of-content-boxes/hackadelic-toc.php =================================================================== --- wp-content/plugins/hackadelic-table-of-content-boxes/hackadelic-toc.php (revision 109810) +++ wp-content/plugins/hackadelic-table-of-content-boxes/hackadelic-toc.php (working copy) @@ -198,7 +196,7 @@ $anchor = sanitize_title( $match[2], $anchor0 ); $this->headers[] = array( 'level' => $match[1], - 'text' => $match[2], + 'text' => strip_tags($match[2]), 'href0' => "$this->url#$anchor0", 'href' => "$this->url#$anchor", );
http://wordpress.org/extend/plugins/hackadelic-table-of-content-boxes/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Hackadelic Table Of Contents Boxes] Extra tags within <h> tags unstripped – patch inc’ is closed to new replies.