Author: xlawrence
Date: Tue Oct 23 11:15:29 2007
New Revision: 18961

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18961&repname=
=3Djahia
Log:
resolve issue: JAHIA-2327: File Manager - Single quote handling

escape url when they are used in javascript calls

Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/javascript/zimbr=
a/complexTree/ComplexTreeProperties.js

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/javascript=
/zimbra/complexTree/ComplexTreeProperties.js
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/javascript/zimbra/complexTree/ComplexTree=
Properties.js&rev=3D18961&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/javascript/zimbr=
a/complexTree/ComplexTreeProperties.js (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/javascript/zimbr=
a/complexTree/ComplexTreeProperties.js Tue Oct 23 11:15:29 2007
@@ -469,12 +469,12 @@
     if ((url.indexOf("'key'") > -1 || url.indexOf("\"key\"") > -1)) {
         if (objectInfo.canWrite !=3D "true") return false;
         var reg =3D new RegExp("(key)", "g");
-        url =3D url.replace(reg, objectInfo.url);
+        url =3D url.replace(reg, escape(objectInfo.url));
         delete reg;
     } else if ((url.indexOf("'folderUrl'") > -1 || url.indexOf("\"folderUr=
l\"") > -1)) {
         if (objectInfo.canRead !=3D "true") return false;
         var reg =3D new RegExp("(folderUrl)", "g");
-        url =3D url.replace(reg, ComplexTreeProperties.webdavPath + object=
Info.url);
+        url =3D url.replace(reg, ComplexTreeProperties.webdavPath + escape=
(objectInfo.url));
         delete reg;
     }
     return url;
@@ -533,13 +533,13 @@
         case ComplexTreeProperties.LINK_FCK:
             if (objectInfo.dir) {
                 if (objectInfo.dir !=3D "root" && objectInfo.dir !=3D "dir=
") {
-                    return [["javascript:Set(\"" + ComplexTreeProperties.w=
ebdavPath + objectInfo.url + "\");void(0);", redLink], objectInfo.title];
+                    return [["javascript:Set(\"" + ComplexTreeProperties.w=
ebdavPath + escape(objectInfo.url) + "\");void(0);", redLink], objectInfo.t=
itle];
                 } else {
                     return [[objectInfo.title, redLink], null];
                 }
 =

             } else {
-                return [["javascript:Set(\"" + objectInfo.url + "\");void(=
0);"], objectInfo.title];
+                return [["javascript:Set(\"" + escape(objectInfo.url) + "\=
");void(0);"], objectInfo.title];
             }
 =

         case ComplexTreeProperties.SELECT_FOLDER:

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to