Merge pull request #4744 from jbfriedrich/fix4741

Update excerpt helper to properly filter HTML footnotes
This commit is contained in:
Jason Williams 2015-01-01 10:34:40 -06:00
commit 25d90c01c9

View File

@ -22,7 +22,7 @@ excerpt = function (options) {
/*jslint regexp:true */
excerpt = String(this.html);
// Strip inline and bottom footnotes
excerpt = excerpt.replace(/<a.*?rel="footnote">.*?<\/a>/gi, '');
excerpt = excerpt.replace(/<a href="#fn.*?rel="footnote">.*?<\/a>/gi, '');
excerpt = excerpt.replace(/<div class="footnotes"><ol>.*?<\/ol><\/div>/, '');
// Strip other html
excerpt = excerpt.replace(/<\/?[^>]+>/gi, '');