Closed
Bug 1178550
Opened 10 years ago
Closed 10 years ago
rtrim message before displaying
Categories
(Instantbird Graveyard :: Conversation, defect)
Instantbird Graveyard
Conversation
Tracking
(Not tracked)
RESOLVED
FIXED
Instantbird 42
People
(Reporter: arlolra, Assigned: arlolra)
Details
Attachments
(1 file, 1 obsolete file)
1.24 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36
Steps to reproduce:
https://github.com/arlolra/ctypes-otr/issues/54
Attachment #8627457 -
Attachment is patch: true
Attachment #8627457 -
Attachment mime type: text/x-patch → text/plain
Attachment #8627457 -
Flags: review?(clokep)
Comment 1•10 years ago
|
||
Comment on attachment 8627457 [details] [diff] [review]
rtrim.patch
Review of attachment 8627457 [details] [diff] [review]:
-----------------------------------------------------------------
I'm OK with using regex, but you can also use String.prototype.trimRight (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/TrimRight).
This change will affect Thunderbird too, but I think we have established on IRC that we don't want to support displaying of messages with whitespace intentionally typed at the end.
Attachment #8627457 -
Flags: review?(clokep) → review+
Comment 2•10 years ago
|
||
Comment on attachment 8627457 [details] [diff] [review]
rtrim.patch
Review of attachment 8627457 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/content/convbrowser.xml
@@ +512,5 @@
> this.setUnreadRuler();
>
> + // rtrim before displaying. This removes any OTR related
> + // whitespace when the extension isn't enabled.
> + let msg = aMsg.displayMessage.replace(/\s+$/, '');
Please use rtrim instead of a regex.
Attachment #8627457 -
Flags: review-
Attachment #8627457 -
Attachment is obsolete: true
Attachment #8629042 -
Flags: review?(clokep)
Comment 4•10 years ago
|
||
Comment on attachment 8629042 [details] [diff] [review]
rtrim.patch from comment 2
Review of attachment 8629042 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8629042 -
Flags: review?(clokep) → review+
Comment 5•10 years ago
|
||
Assignee: nobody → arlolra
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•