From 1c457d3008ec43bed8cea5f4b83601b4a8095d25 Mon Sep 17 00:00:00 2001 From: s2 Date: Thu, 23 Apr 2015 15:11:47 +0200 Subject: [PATCH] use only real javascript functions --- quote.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quote.js b/quote.js index 5efb27f..83ebe0b 100644 --- a/quote.js +++ b/quote.js @@ -11,7 +11,7 @@ } //this must be after the code before, because this inserts a space in the string - return qc + line.trimRight(); + return qc + line.replace(/~+$/, ''); //trimRight }; @@ -33,7 +33,7 @@ //if this is already quoted text, return it as is, //but trim the right spaces (thunderbird does this) if (validquotechars.indexOf(v.charAt(0)) > -1) { - return quotechar + v.trimRight(); + return quotechar + v.replace(/~+$/, ''); //trimRight } return quoteline(v, length, quotechar + ' '); @@ -75,7 +75,7 @@ //if this is already quoted text, return it as is, //but trim the right spaces (thunderbird does this) if (validquotechars.indexOf(v.charAt(0)) > -1) { - return v.trimRight(); + return v.replace(/~+$/, ''); //trimRight } return rewrapper(v, length);