mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
Merge pull request #4744 from jbfriedrich/fix4741
Update excerpt helper to properly filter HTML footnotes
This commit is contained in:
commit
25d90c01c9
@ -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, '');
|
||||
|
Loading…
Reference in New Issue
Block a user