Skip to content

Commit

Permalink
Fix #132: Was returning an empty string instead of the original strin…
Browse files Browse the repository at this point in the history
…g when recoding text
  • Loading branch information
eyalroz committed Jul 30, 2024
1 parent 4f8d392 commit 03af201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chrome/content/bidimailui-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ BiDiMailUI.utf8MisdetectionExpression = new RegExp(BiDiMailUI.RegExpStrings.MISD
// Note: This may change the strategy as per MozDev issue 18707
BiDiMailUI.correctivelyRecodeText = function (str, mailnewsDecodingType, preferredCharset, strategy) {
if (!str || str.length == 0) return null;
if (!strategy.recodeUTF8 && !strategy.recodePreferredCharset) return null;
if (!strategy.recodeUTF8 && !strategy.recodePreferredCharset) return str;
let lines = str.split('\n');
let encoderForUTF8Recoding = (strategy.recodeUTF8) ? new TextEncoder(
(mailnewsDecodingType === "latin-charset") ? 'windows-1252' : preferredCharset) : null;
Expand Down

0 comments on commit 03af201

Please sign in to comment.