Room links in iconbar roomlist now properly escaped with encodeURIcomponent()
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 20 Sep 2011 19:42:11 +0000 (15:42 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 20 Sep 2011 19:42:11 +0000 (15:42 -0400)
webcit/iconbar.c
webcit/static/wclib.js

index bdcadfb1caa6552da0721cab02e3ce3abecfa192..7a6e39d1ac477d9da041872a5892a931e79d52a6 100644 (file)
@@ -133,7 +133,7 @@ void LoadIconSettings(StrBuf *iconbar, long lvalue)
        {
                WCC->IBSettingsVec = (long*) malloc (nIBV * sizeof(long));
        }
-       /**
+       /*
         * The initialized values of these variables also happen to
         * specify the default values for users who haven't customized
         * their iconbars.  These should probably be set in a master
index 31a0d7b4ad674d8236c7f39917d8ac8458eb3196..e8c0c4ee72c2aa1cd2df3f9e8132c02c284d9552 100644 (file)
@@ -270,7 +270,7 @@ function addRoomToList(floorUL,room, roomToEmphasize) {
   var hasNewMsgs = ((raflags & UA_HASNEWMSGS) == UA_HASNEWMSGS);
   var roomLI = document.createElement("li");
   var roomA = document.createElement("a");
-  roomA.setAttribute("href","dotgoto?room="+roomName);
+  roomA.setAttribute("href","dotgoto?room="+encodeURIComponent(roomName));
   roomA.appendChild(document.createTextNode(roomName));
   roomLI.appendChild(roomA);
   floorUL.appendChild(roomLI);