Bug 1412378 - remove last remaining charset passing to encodeMimePartIIStr_UTF8() in FeedItem.js. r=alta88
authoraceman <acelists@atlas.sk>
Fri, 27 Oct 2017 11:28:00 +0200
changeset 29270 93f59d94a828815499af0d953d7dd4f8b333bb14
parent 29269 f24014af19e1acf0e4c21560fb1cb386344e8c90
child 29271 103523d052a8ea9ea3b800d3d4328e48d113502f
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalta88
bugs1412378
Bug 1412378 - remove last remaining charset passing to encodeMimePartIIStr_UTF8() in FeedItem.js. r=alta88
mailnews/extensions/newsblog/content/FeedItem.js
--- a/mailnews/extensions/newsblog/content/FeedItem.js
+++ b/mailnews/extensions/newsblog/content/FeedItem.js
@@ -214,26 +214,26 @@ FeedItem.prototype =
       ds.Change(resource, FeedUtils.FZ_STORED,
                 currentValue, FeedUtils.RDF_LITERAL_TRUE);
     }
     else
       ds.Assert(resource, FeedUtils.FZ_STORED,
                 FeedUtils.RDF_LITERAL_TRUE, true);
   },
 
-  mimeEncodeSubject: function(aSubject, aCharset)
+  mimeEncodeSubject: function(aSubject)
   {
     // This routine sometimes throws exceptions for mis-encoded data so
     // wrap it with a try catch for now.
     let newSubject;
     try
     {
       newSubject = mailServices.mimeConverter.encodeMimePartIIStr_UTF8(aSubject,
                      false,
-                     aCharset, 9, 72);
+                     "UTF-8", 9, 72);
     }
     catch (ex)
     {
       newSubject = aSubject;
     }
 
     return newSubject;
   },
@@ -254,17 +254,17 @@ FeedItem.prototype =
         Ci.nsIDocumentEncoder.OutputAbsoluteLinks,
         0);
 
     // Compress white space in the subject to make it look better.  Trim
     // leading/trailing spaces to prevent mbox header folding issue at just
     // the right subject length.
     title = title.replace(/[\t\r\n]+/g, " ").trim();
 
-    this.title = this.mimeEncodeSubject(title, this.characterSet);
+    this.title = this.mimeEncodeSubject(title);
 
     // If the date looks like it's in W3C-DTF format, convert it into
     // an IETF standard date.  Otherwise assume it's in IETF format.
     if (this.mDate.search(/^\d\d\d\d/) != -1)
       this.mDate = new Date(this.mDate).toUTCString();
 
     // If there is an inreplyto value, create the headers.
     let inreplytoHdrsStr = this.inReplyTo ?