Quellcode durchsuchen

[ST24PRJ-612] pc/mo 전시 상품명 깨짐

sshong vor 4 Jahren
Ursprung
Commit
f3f2c7e0da

+ 10 - 3
src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html

@@ -1466,8 +1466,15 @@
 		$('#custOrderListFrom input[name=pageNo]').val(result.pageing.pageable.pageNo.addComma());
 		$('#ordPgNo').html(result.pageing.pageable.pageNo.addComma());
 		$('#ordEndPgNo').html(result.pageing.pageable.totalPage.addComma());
-
-		gridOrderOptions.api.setRowData(result.custOrderList);
+		//2022.01.05 replaceXSS 적용
+		var data = result.custOrderList;
+		let modifyList = [];
+		$.each(data, function(idx, item) {
+			let recipNm = item.recipNm;
+			item.recipNm = recipNm.replaceXSS();
+			modifyList.push(item);
+		});
+		gridOrderOptions.api.setRowData(modifyList);
 		gagaPaging.createPagination(result.pageing.pageable);
 	}
 
@@ -1764,7 +1771,7 @@
 		var data = gagaAgGrid.getAllRowData(gridAddrOptions);
 		let modifyList = [];
 		$.each(data, function(idx, item) {
-			let recipNm = item.recipDtlAddr;
+			let recipNm = item.recipNm;
 			let recipDtlAddr = item.recipDtlAddr;
 			let recipZipcode = item.recipZipcode;
 			let recipBaseAddr = item.recipBaseAddr;

+ 1 - 0
src/main/webapp/WEB-INF/views/display/CategoryGoodsForm.html

@@ -593,6 +593,7 @@
 		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
 		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
 		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		//2022.01.05 replaceXSS 적용
 		var data = result.categoryGoodsList;
 		let modifyList = [];
 		$.each(data, function(idx, item) {

+ 9 - 8
src/main/webapp/WEB-INF/views/display/CategorySearchForm.html

@@ -178,14 +178,6 @@
 		// Fetch data
 		gagaAgGrid.fetch($('#searchCategoryListForm').prop('action'), categoryGridOptions, '#searchCategoryListForm', function(data) {
 			let selLvl = Number($('#searchCategoryListForm input[name=selLvl]').val()) + 1;
-			var data = data;
-			let modifyList = [];
-			$.each(data, function(idx, item) {
-				let cateNm = item.cateNm;
-				item.cateNm = cateNm.replaceXSS();
-				modifyList.push(item);
-			});
-			categoryGridOptions.api.setRowData(modifyList);
 			for (let i = 2; i <= 5; i++) {
 				if (i >= selLvl) {
 					$('#selCate' + i).html('<option value="">[카테고리' + (i - 1) + ']</option>');
@@ -198,6 +190,15 @@
 					tag += '<option value="' + data[i].cateNo + '">[' + data[i].cateNo + '] ' + data[i].cateNm + '</option>';
 				}
 			}
+			//2022.01.05 replaceXSS 적용
+			var data = data;
+			let modifyList = [];
+			$.each(data, function(idx, item) {
+				let cateNm = item.cateNm;
+				item.cateNm = cateNm.replaceXSS();
+				modifyList.push(item);
+			});
+			categoryGridOptions.api.setRowData(modifyList);
 
 			$("#selCate" + selLvl).append(tag);
 			$("#btnNew").click();

+ 1 - 0
src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -493,6 +493,7 @@
 			if (typeof item.brandKnm != "undefined" && !gagajf.isNull(item.brandKnm)) item.brandKnm = item.brandKnm.replaceAll('&amp;', '&').replaceAll('&gt;', '>').replaceAll('&lt', '<').replaceAll('&nbsp;', ' ');
 			if (typeof item.brandGroupNm != "undefined" && !gagajf.isNull(item.brandGroupNm)) item.brandGroupNm = item.brandGroupNm.replaceAll('&amp;', '&').replaceAll('&gt;', '>').replaceAll('&lt', '<').replaceAll('&nbsp;', ' ');
 		});
+		//2022.01.05 replaceXSS 적용
 		var data = result.goodsList
 		let modifyList = [];
 		$.each(data, function(idx, item) {

+ 2 - 1
src/main/webapp/WEB-INF/views/goods/GoodsTitleReserveForm.html

@@ -332,7 +332,8 @@
 		$('#goodsTnmListForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
 		$('#goodsTnmListForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
 		$('#goodsTnmListForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
-		var data = result.goodsTnmList;		//XSS 그리드 내 변환
+		//2022.01.05 replaceXSS 적용
+		var data = result.goodsTnmList;
 		let modifyList = [];
 		$.each(data, function(idx, item) {
 			if(item.goodsTnm != null && item.goodsTnm !=  '' && item.goodsTnm != 'undefined'){

+ 7 - 6
src/main/webapp/WEB-INF/views/marketing/CouponPopupForm.html

@@ -1887,14 +1887,12 @@
 					xhr.setRequestHeader('Accept'		, 'application/json');
 					xhr.setRequestHeader('Content-Type'	, 'application/json');
 				},
-				success 	: function(result) {zzz
-					var data = result.returnList;
+				success 	: function(result) {
+					/*var data = result.returnList;
 					let brandList = [];
 					$.each(data, function(idx, item) {
-						let brandEnm = item.brandEnm;
-						item.brandEnm = brandEnm.replaceXSS();
 					brandList.push(item);
-				});
+				});*/
 					if (result != null) {
 						for (let i = 0 ; i < result.returnList.length ; i++) {
 							let addChk = true, gridListValue = gagaAgGrid.getAllRowData(brandGridOptions);		// 받아온 모든 데이터
@@ -1906,7 +1904,10 @@
 
 							// 중복되지 않은 데이터 리스트에 추가
 							if (addChk) {
-								gagaAgGrid.addRowData(brandGridOptions, {"brandCd" : result.returnList[i].brandCd, "brandEnm" : result.returnList[i].brandEnm});
+								//2022.01.05 replaceXSS 적용
+								let brandEnm = result.returnList[i].brandEnm;
+								brandEnm = brandEnm.replaceXSS();
+								gagaAgGrid.addRowData(brandGridOptions, {"brandCd" : result.returnList[i].brandCd, "brandEnm" : brandEnm});
 							}
 						}
 					}

+ 7 - 4
src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html

@@ -604,7 +604,7 @@
 					gridOptionsFreeGoods2List.columnApi.getColumn("limitQty").colDef.editable = false;
 				//}
 			}
-			
+			//2022.01.05 replaceXSS 적용
 			var data = freegift.brandList;
 			let brandList = [];
 			$.each(data, function(idx, item) {
@@ -816,13 +816,13 @@
 						xhr.setRequestHeader('Content-Type'	, 'application/json');
 					},
 					success 	: function(result) {
-						var data = result.returnList;
+						/*var data = result.returnList;
 						let brandList = [];
 						$.each(data, function(idx, item) {
 							let brandEnm = item.brandEnm;
 							item.brandEnm = brandEnm.replaceXSS();
 							brandList.push(item);
-						});
+						});*/
 						if (result != null) {
 							for (let i = 0 ; i < result.returnList.length ; i++) {
 								let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);		// 받아온 모든 데이터
@@ -834,7 +834,10 @@
 
 								// 중복되지 않은 데이터 리스트에 추가
 								if (addChk) {
-									gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result.returnList[i].brandCd, "brandEnm" : result.returnList[i].brandEnm, "supplyCompNm" : result.returnList[i].supplyCompNm, "targetGb" : "G260_12"});
+									//2022.01.05 replaceXSS 적용
+									let brandEnm = result.returnList[i].brandEnm;
+									brandEnm = brandEnm.replaceXSS();
+									gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result.returnList[i].brandCd, "brandEnm" : brandEnm, "supplyCompNm" : result.returnList[i].supplyCompNm, "targetGb" : "G260_12"});
 								}
 							}
 						}

+ 7 - 5
src/main/webapp/WEB-INF/views/marketing/MorebetterPopupForm.html

@@ -928,15 +928,14 @@
 					xhr.setRequestHeader('Content-Type'	, 'application/json');
 				},
 				success 	: function(result) {
-						var data = result.returnList;
+						/*var data = result.returnList;
 						let modifyList = [];
 						$.each(data, function(idx, item) {
-							let brandEnm = item.brandEnm;
-							item.brandEnm = brandEnm.replaceXSS();
 							
+
 							modifyList.push(item);
 						});
-						gridOptionsFGBrandList.api.setRowData(modifyList);
+						gridOptionsFGBrandList.api.setRowData(modifyList);*/
 					if (result != null) {
 						for(let i = 0 ; i < result.returnList.length ; i++) {
 							let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);		// 받아온 모든 데이터
@@ -948,7 +947,10 @@
 
 							// 중복되지 않은 데이터 리스트에 추가
 							if(addChk) {
-								gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result.returnList[i].brandCd, "brandEnm" : result.returnList[i].brandEnm, "supplyCompNm" : result.returnList[i].supplyCompNm, "targetGb" : "G260_12"});
+								//2022.01.05 replaceXSS 적용
+								let brandEnm = result.returnList[i].brandEnm;
+								brandEnm = brandEnm.replaceXSS();
+								gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result.returnList[i].brandCd, "brandEnm" : brandEnm, "supplyCompNm" : result.returnList[i].supplyCompNm, "targetGb" : "G260_12"});
 							}
 						}
 					}

+ 2 - 1
src/main/webapp/WEB-INF/views/marketing/PlanCornerListForm.html

@@ -182,7 +182,8 @@
 
 		gagajf.ajaxJsonSubmit(actionUrl, jsonData, function(data) {
 			gridOptionsGoods.api.setRowData(data.planGoodsList);
-			var data = data.planGoodsList;		//XSS 그리드 내 변환
+			//2022.01.05 replaceXSS 적용
+			var data = data.planGoodsList;
 			let modifyList = [];
 			$.each(data, function(idx, item) {
 

+ 2 - 1
src/main/webapp/WEB-INF/views/marketing/PlanListForm.html

@@ -361,7 +361,8 @@
 		$('#planListSearchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
 		$('#planListSearchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
 		$('#planListSearchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
-		var data = result.planList;		//XSS 그리드 내 변환
+		//2022.01.05 replaceXSS 적용
+		var data = result.planList;
 		let modifyList = [];
 		$.each(data, function(idx, item) {
 			let dtlTitle1 = item.dtlTitle1;

+ 2 - 1
src/main/webapp/WEB-INF/views/marketing/ShotDeliveryForm.html

@@ -249,7 +249,8 @@
 		var jsonData = JSON.stringify(data);
 
 		gagajf.ajaxJsonSubmit(actionUrl, jsonData, function(data) {
-			var data = data.brandGoodsList;		//XSS 그리드 내 변환
+			//2022.01.05 replaceXSS 적용
+			var data = data.brandGoodsList;		
 			let modifyList = [];
 			$.each(data, function(idx, item) {
 				let goodsNm = item.goodsNm;

+ 2 - 1
src/main/webapp/WEB-INF/views/marketing/SocialShoppingListForm.html

@@ -588,7 +588,8 @@
 		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
 		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
 		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
-		var data = result.socialList;		//XSS 그리드 내 변환
+		//2022.01.05 replaceXSS 적용
+		var data = result.socialList;		
 		let modifyList = [];
 		$.each(data, function(idx, item) {
 			let socialTnm = item.socialTnm;

+ 2 - 1
src/main/webapp/WEB-INF/views/shoplinker/ShoplinkerStockForm.html

@@ -271,7 +271,8 @@
 		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
 		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
 		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
-		var data = result.stockList;		//XSS 그리드 내 변환
+		//2022.01.05 replaceXSS 적용
+		var data = result.stockList;		
 		let modifyList = [];
 		$.each(data, function(idx, item) {
 			let apiMessage = item.apiMessage;