From e1d43d5e4e749fa7756b324bbb16da561fc45e87 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 22 Aug 2012 00:12:51 +0200 Subject: [PATCH] Drag+Drop move: propperly escape the roomname so + and friends in roomnames remain intact. --- webcit/static/wclib.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index fb828a683..de48e2efb 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -388,11 +388,12 @@ function addRoomToList(floorUL,room, roomToEmphasize) { function roomListDropHandler(target, dropped) { if (dropped.getAttribute("citadel:msgid")) { var room = getTextContent(target); + console.log(room); var msgIds = ""; for(msgId in currentlyMarkedRows) { //defined in summaryview.js msgIds += ","+msgId; if (msgIds.length > 800) { - var mvCommand = encodeURI("g_cmd=MOVE " + msgIds + "|"+room+"|0"); + var mvCommand = "g_cmd=MOVE%20" + msgIds + "|"+encodeURIComponent(room)+"|0"; new Ajax.Request("ajax_servcmd", { parameters: mvCommand, method: 'post', @@ -401,7 +402,7 @@ function roomListDropHandler(target, dropped) { } } - var mvCommand = encodeURI("g_cmd=MOVE " + msgIds + "|"+room+"|0"); + var mvCommand = "g_cmd=MOVE%20" + msgIds + "|"+encodeURIComponent(room)+"|0"; new Ajax.Request('ajax_servcmd', { method: 'post', parameters: mvCommand, -- 2.30.2