mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge pull request #4744 from jbfriedrich/fix4741
Update excerpt helper to properly filter HTML footnotes
This commit is contained in:
commit
25d90c01c9
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ excerpt = function (options) {
|
||||||
/*jslint regexp:true */
|
/*jslint regexp:true */
|
||||||
excerpt = String(this.html);
|
excerpt = String(this.html);
|
||||||
// Strip inline and bottom footnotes
|
// 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>/, '');
|
excerpt = excerpt.replace(/<div class="footnotes"><ol>.*?<\/ol><\/div>/, '');
|
||||||
// Strip other html
|
// Strip other html
|
||||||
excerpt = excerpt.replace(/<\/?[^>]+>/gi, '');
|
excerpt = excerpt.replace(/<\/?[^>]+>/gi, '');
|
||||||
|
|
Loading…
Add table
Reference in a new issue