svn commit: r1302218 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1302218 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js

lektran
Author: lektran
Date: Sun Mar 18 20:31:10 2012
New Revision: 1302218

URL: http://svn.apache.org/viewvc?rev=1302218&view=rev
Log:
Escape errors returned from ajax calls in the checkout pages

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=1302218&r1=1302217&r2=1302218&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Sun Mar 18 20:31:10 2012
@@ -144,11 +144,12 @@ function getServerError(data) {
     if (data._ERROR_MESSAGE_LIST_ != undefined) {
         serverErrorHash = data._ERROR_MESSAGE_LIST_;
         jQuery.each(serverErrorHash, function(i, error) {
-            serverError += error.message + '<br/>';
+            var encodedErrorMessage = jQuery('<div/>').text(error.message).html();
+            serverError += encodedErrorMessage + '<br/>';
         });
     }
     if (data._ERROR_MESSAGE_ != undefined) {
-        serverError = data._ERROR_MESSAGE_;
+        serverError = jQuery('<div/>').text(data._ERROR_MESSAGE_).html();
     }
     return serverError;
 }