Fixing replaceAll call which is not supported in older browsers.

This commit is contained in:
Samuel Clay 2021-07-05 11:49:50 -04:00
parent d27d00db10
commit 889caf82a4

View file

@ -51,7 +51,7 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
// First do a naive strip, which is faster than rendering which makes network calls
content = content && content.replace(/<(?:.|\n)*?>/gm, ' ');
content = content && Inflector.stripTags(content);
content = content && content.replaceAll(' ', ' '); // Invisible space, boo
content = content && content.replace(/ /g, ' '); // Invisible space, boo
content = content && content.replace(/\s+/gm, ' ');
return _.string.prune(_.string.trim(content), length || 150, "...");