Skip to content

Commit

Permalink
strip HTML char in message body since some changes in stropheJS
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Mercadal committed Feb 2, 2012
1 parent 5b5e40c commit ccaa2e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ArchipelClient/AppController.j
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ var TNArchipelStatusAvailableLabel = @"Available",
- (void)didReceiveUserMessage:(CPNotification)aNotification
{
var user = [[[aNotification userInfo] objectForKey:@"stanza"] fromUser],
message = [[[[aNotification userInfo] objectForKey:@"stanza"] firstChildWithName:@"body"] text],
message = TNStropheStripHTMLCharCode([[[[aNotification userInfo] objectForKey:@"stanza"] firstChildWithName:@"body"] text]),
bundle = [CPBundle bundleForClass:[self class]],
customIcon = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"message-icon.png"]],
currentContact = [aNotification object];
Expand Down
4 changes: 2 additions & 2 deletions ArchipelClient/ModulesSources/UserChat/TNUserChatController.j
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
if ([stanza containsChildrenWithName:@"body"])
{
var from = ([stanza valueForAttribute:@"from"] == @"me") ? @"me" : [_entity nickname],
message = [[stanza firstChildWithName:@"body"] text],
message = TNStropheStripHTMLCharCode([[stanza firstChildWithName:@"body"] text]),
color = ([stanza valueForAttribute:@"from"] == @"me") ? [CPColor ] : [_entity nickname];

[self appendMessageToBoard:message from:from];
Expand Down Expand Up @@ -234,7 +234,7 @@

if ([stanza containsChildrenWithName:@"body"])
{
var messageBody = [[stanza firstChildWithName:@"body"] text];
var messageBody = TNStropheStripHTMLCharCode([[stanza firstChildWithName:@"body"] text]);

[imageSpinnerWriting setHidden:YES];
[self appendMessageToBoard:messageBody from:[_entity nickname]];
Expand Down

0 comments on commit ccaa2e3

Please sign in to comment.