알림톡 대체문자시 XSS에 관련 특수기호 변경
This commit is contained in:
parent
c34af54291
commit
da3567b8c1
@ -203,9 +203,9 @@ $(document).ready(function(){
|
||||
|
||||
$('#smsTxtArea').val('');
|
||||
// // 미리보기 텍스트를 가져와 줄바꿈 처리 후 대체문자 내용으로 입력
|
||||
$('#smsTxtArea').val(
|
||||
$('.template_text').html().trim().replace(/(<br>|<br\/>|<br \/>)/g, '\r\n')
|
||||
);
|
||||
var template_text = $('.template_text').html().trim();
|
||||
template_text = XSSChange(template_text);
|
||||
$('#smsTxtArea').val(template_text);
|
||||
|
||||
// //문자 내용 입력시 바이트수 계산하기
|
||||
|
||||
|
||||
@ -180,6 +180,21 @@ function XSSCheck(str, level) {
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* XSS 변경하기
|
||||
*
|
||||
*
|
||||
*/
|
||||
function XSSChange(str) {
|
||||
|
||||
str = str.replaceAll(/(<br>|<br\/>|<br \/>)/g, '\r\n');
|
||||
str = str.replaceAll("<", '<');
|
||||
str = str.replaceAll(">", '>');
|
||||
str = str.replaceAll("&", '&');
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
//숫자 천단위 콤마 찍어주기
|
||||
function numberWithCommas(x) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user