Author: rhirsch Date: Mon Jul 5 07:34:24 2010 New Revision: 960466 URL: http://svn.apache.org/viewvc?rev=960466&view=rev Log: [ESME-234] Reply doesn't work when message contains chars that must be encoded
Modified: incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js Modified: incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js?rev=960466&r1=960465&r2=960466&view=diff ============================================================================== --- incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js (original) +++ incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js Mon Jul 5 07:34:24 2010 @@ -150,12 +150,12 @@ function displayMessages(msgArray, eleme 'clearResend("resend_' + id + '")'); } - var tempStr = msgBody.replaceAll ("'", "."); + var tempStr = msgBody.replaceAll ("'", "ZZZ$%$"); - var myReplyMsg = tempStr.replaceAll (".", "\'"); + var myReplyMsg = tempStr.replaceAll ("ZZZ$%$", "\\'"); newMsg.find('#reply').attr('href', - "javascript:setReplyTo(" + id + ", '"+ myReplyMsg + "'," + msgPoolId + ", '" + msgAuthor.nickname + "')"); + "javascript:setReplyTo(" + id + ", '"+ escape(myReplyMsg) + "'," + msgPoolId + ", '" + msgAuthor.nickname + "')"); var conversation = newMsg.find('#conversation'); if (msgConversation != 0) { conversation.attr('href',