Author: lektran
Date: Sun Mar 18 20:51:43 2012
New Revision: 1302221
URL:
http://svn.apache.org/viewvc?rev=1302221&view=revLog:
Backport from trunk r1302218:
Escape errors returned from ajax calls in the checkout pages
Modified:
ofbiz/branches/release11.04/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
Modified: ofbiz/branches/release11.04/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release11.04/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=1302221&r1=1302220&r2=1302221&view=diff==============================================================================
--- ofbiz/branches/release11.04/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/branches/release11.04/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Sun Mar 18 20:51:43 2012
@@ -143,12 +143,13 @@ function getServerError(data) {
var serverError = "";
if (data._ERROR_MESSAGE_LIST_ != undefined) {
serverErrorHash = data._ERROR_MESSAGE_LIST_;
- serverErrorHash.each(function(error) {
- serverError += error.message;
+ jQuery.each(serverErrorHash, function(i, error) {
+ 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;
}