You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2007/11/21 15:36:29 UTC

svn commit: r597102 - /myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Author: matzew
Date: Wed Nov 21 06:36:27 2007
New Revision: 597102

URL: http://svn.apache.org/viewvc?rev=597102&view=rev
Log:
TRINIDAD-829 fixed wrong formating of params in JS

Modified:
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js?rev=597102&r1=597101&r2=597102&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js Wed Nov 21 06:36:27 2007
@@ -2795,6 +2795,12 @@
       currValue = "";
     }
 
+    // TRINIDAD-829:
+    // we replace '{' and '}' to ensure, that tokens containing values
+    // like {3} aren't parsed more than once...
+    currValue = currValue.replace("{","{'");
+    currValue = currValue.replace("}","'}");
+
     // the tokens are delimited by '{' before and '}' after the token
     var currRegExp = "{" + currToken + "}";
 
@@ -2842,12 +2848,20 @@
     }
  }
 
+  // TRINIDAD-829:
+  // we finally re-replace the '{' and '}'...
+  while(currString.indexOf("{'")!=-1)
+  {
+    currString= currString.replace("{'","{");
+    currString= currString.replace("'}","}");
+  }
+
   // And now take any doubled-up single quotes down to one,
   // to handle escaping
   var twoSingleQuotes = /''/g;
+  
   return currString.replace(twoSingleQuotes, "'");
 }
-
 
 /**
  * Chain two functions together returning whether the default