mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Better way to show invisible space is by using unicode code points instead of utf-8 characters.
This commit is contained in:
parent
889caf82a4
commit
cb1f168812
1 changed files with 1 additions and 1 deletions
|
@ -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.replace(/ /g, ' '); // Invisible space, boo
|
||||
content = content && content.replace(/[\u00a0\u200c]/g, ' '); // Invisible space, boo
|
||||
content = content && content.replace(/\s+/gm, ' ');
|
||||
|
||||
return _.string.prune(_.string.trim(content), length || 150, "...");
|
||||
|
|
Loading…
Add table
Reference in a new issue