Skip to content

Commit

Permalink
refs #626, fixed problem of searched result abstract display
Browse files Browse the repository at this point in the history
walty8 committed Apr 28, 2017
1 parent 48050e0 commit e6350f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/page-common.js
Original file line number Diff line number Diff line change
@@ -201,12 +201,14 @@ SimpleGmailNotes.start = function(){
.replace(/>/g, '>');
};

var specialCharRe = new RegExp(String.fromCharCode(160), 'g');
var stripHtml = function(value){
return value.replace(/<(?:.|\n)*?>/gm, '');
return value.replace(/<(?:.|\n)*?>/gm, '')
.replace(specialCharRe, ' ');
};

var getEmailKey = function(title, sender, time, excerpt){
var emailKey = sender + "|" + time + "|" + stripHtml(title) + "|" + excerpt;
var emailKey = sender + "|" + time + "|" + stripHtml(title) + "|" + stripHtml(excerpt);

debugLog("@209, generalted email key:" + emailKey);

@@ -265,6 +267,7 @@ SimpleGmailNotes.start = function(){
// I needed the opposite function today, so adding here too:
var htmlUnescape = function(value){
return String(value)
.replace(/&nbsp;/g, ' ')
.replace(/&quot;/g, '"')
.replace(/&#39;/g, "'")
.replace(/&lt;/g, '<')

0 comments on commit e6350f0

Please sign in to comment.