From 1a9d8fdeb4b57cadc1861fe9814408b89afd4cb1 Mon Sep 17 00:00:00 2001 From: David Ascher Date: Fri, 26 Jun 2009 01:43:02 -0700 Subject: [PATCH] contentWhittle doesn't cope with messages that include unicode non-breaking spaces - bug 495185 r=asuth sr=bienvenu --- mailnews/db/gloda/modules/fundattr.js | 2 +- mailnews/db/gloda/test/unit/test_gloda_content.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mailnews/db/gloda/modules/fundattr.js b/mailnews/db/gloda/modules/fundattr.js index 86b6e0b4ba..c137c59d82 100644 --- a/mailnews/db/gloda/modules/fundattr.js +++ b/mailnews/db/gloda/modules/fundattr.js @@ -645,7 +645,7 @@ var GlodaFundAttr = { let rangeStart = 0, lastNonBlankLine = null, prevLastNonBlankLine = null; let inQuoteDepth = 0; for each (let [iLine, line] in Iterator(bodyLines)) { - if (!line) + if (!line || (line == "\xa0")) /* unicode non breaking space */ continue; if (line[0] == ">") { diff --git a/mailnews/db/gloda/test/unit/test_gloda_content.js b/mailnews/db/gloda/test/unit/test_gloda_content.js index 4e7032bc32..34452efe88 100644 --- a/mailnews/db/gloda/test/unit/test_gloda_content.js +++ b/mailnews/db/gloda/test/unit/test_gloda_content.js @@ -73,6 +73,14 @@ var messageInfos = [ [false, ""], [true, "Verily!"]] }, + { + name: "german style", + bode: [[false, "Mark Banner wrote:"], + [false, "\xa0"], + [false, "> We haven't nailed anything down in detail yet, depending on how we are "], + [true, "That sounds great and would definitely be appreciated by localizers."], + [false, ""]] + }, { name: "tortuous interference", bode: [[false, "> wrote"],