Skip to content

Commit

Permalink
BF: Reply of reply with unexpected newlines renders badly
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed Oct 31, 2018
1 parent 975443b commit de019bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Bug fix:
* MXEvent: Move `invite_room_state` to the correct place in the client-server API (vector-im/riot-ios/issues/2010).
* MXRoomSummaryUpdater: Fix minor issue in updateSummaryAvatar method.
* Left room is still displayed as "Empty room" in rooms list (vector-im/riot-ios/issues/2082).
* Reply of reply with unexpected newlines renders badly (vector-im/riot-ios/issues/2086).

Changes in Matrix iOS SDK in 0.11.5 (2018-10-05)
===============================================
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Data/MXRoom.m
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ - (NSString*)replyMessageFormattedBodyFromEventToReply:(MXEvent*)eventToReply
if (isSenderMessageAReplyTo)
{
NSError *error = nil;
NSRegularExpression *replyRegex = [NSRegularExpression regularExpressionWithPattern:@"^<mx-reply>.*</mx-reply>" options:NSRegularExpressionCaseInsensitive error:&error];
NSRegularExpression *replyRegex = [NSRegularExpression regularExpressionWithPattern:@"^<mx-reply>[\\s\\S]*</mx-reply>" options:NSRegularExpressionCaseInsensitive error:&error];
NSString *senderMessageFormattedBodyWithoutReply = [replyRegex stringByReplacingMatchesInString:senderMessageFormattedBody options:0 range:NSMakeRange(0, senderMessageFormattedBody.length) withTemplate:@""];

if (error)
Expand Down

0 comments on commit de019bf

Please sign in to comment.