조회 : 129
공대님 소스 보고 고쳐봤는데;; 자스에서 /* 이런거나 /( 이부분에서 에러가 나네요. 혹시 아래 함수 같은 역활을 하는 php함수가 있을까요?
template_ 위에 위지윅을 만들고 있는데 본문내용을 자스로 받다보니 별 에러가 다 나는 군요.. 흐뮈..
공대님은 어떻게 처리 하셨는지 궁금합니다. ㅠㅠ
function htmlspecialchars(str)
{
str = str.toString() ;
str = str.replace(/&/g, "&") ;
str = str.replace(/</g, "<") ;
str = str.replace(/>/g, ">") ;
str = str.replace(/"/g, """) ;
str = str.replace(/'/g, "'") ;
str = str.replace(/!/g, "!") ;
str = str.replace(/@/g, "@") ;
str = str.replace(/#/g, "#") ;
str = str.replace(/$/g, "$") ;
str = str.replace(/%/g, "%") ;
str = str.replace(/^/g, "^") ;
str = str.replace(/&/g, "&") ;
str = str.replace(/(/g, "(") ;
str = str.replace(/*/g, "*") ;
str = str.replace(/)/g, ")") ;
str = str.replace(/+/g, "+") ;
str = str.replace(/-/g, "-") ;
str = str.replace(/_/g, "_") ;
str = str.replace(/=/g, "=") ;
str = str.replace(/|/g, "|") ;
str = str.replace(/-/g, "\") ;
str = str.replace(/[/g, "[") ;
str = str.replace(/]/g, "]") ;
str = str.replace(/{/g, "{") ;
str = str.replace(/}/g, "}") ;
str = str.replace(/;/g, ";") ;
str = str.replace(/:/g, ":") ;
str = str.replace(/,/g, ",") ;
str = str.replace(/./g, ".") ;
str = str.replace(/</g, "<") ;
str = str.replace(/>/g, ">") ;
str = str.replace(///g, "/") ;
str = str.replace(/?/g, "?") ;
str = str.replace(/~/g, "~") ;
str = str.replace(/`/g, "`") ;
return str ;
}
제목 | 작성자 | 날짜 |
---|---|---|
공대여자 | ||
mins | ||
test | ||
mins | ||
농약먹고어흥 | ||
mins | ||
mins | ||
asdasd
S
|
mins | |
mins | ||
권지훈 | ||
mins | ||
mins |