HTML-Encode the nickname in the chat window (closes #1216)

cefexperiments
Ingo Bauersachs 12 years ago
parent b3f722b8d4
commit aac17386e1

@ -140,6 +140,7 @@ service.gui.CHAT_ROOMS=Chat rooms
service.gui.CHAT_ROOM=Chat room
service.gui.CHAT_ROOM_SUBJECT_CHANGED={0} has changed the subject to {1}
service.gui.CHAT_ROOM_ALTERNATE_ADDRESS=You can continue the conversation in the following chat room: {0}
service.gui.CHAT_NICKNAME_CHANGE={0} is now known as {1}
service.gui.CHOOSE_CONTACT=Choose contact
service.gui.CHOOSE_NUMBER=Choose number
service.gui.CHOOSE_ACCOUNT=Please select one of the listed accounts.

@ -37,6 +37,7 @@
import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import org.apache.commons.lang3.*;
import org.jitsi.util.*;
/**
@ -3078,12 +3079,16 @@ public void loadSkin()
*/
public void chatRoomPropertyChanged(ChatRoomMemberPropertyChangeEvent event)
{
String message = GuiActivator.getResources().getI18NString(
"service.gui.CHAT_NICKNAME_CHANGE",
new String[]{
(String) event.getOldValue(),
(String) event.getNewValue()
});
this.conversationPanel
.appendMessageToEnd(
"<DIV identifier=\"message\" style=\"color:#707070;\">"
+ event.getOldValue()
+ " is now known as "
+ event.getNewValue() + "</DIV>",
+ StringEscapeUtils.escapeHtml4(message) + "</DIV>",
ChatHtmlUtils.HTML_CONTENT_TYPE);
}

Loading…
Cancel
Save