Author: lektran
Date: Sun Mar 18 20:31:10 2012
New Revision: 1302218
URL:
http://svn.apache.org/viewvc?rev=1302218&view=revLog:
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;
}