정리해서 다시 질문요(급) > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

정리해서 다시 질문요(급) 정보

정리해서 다시 질문요(급)

본문

읽어 주셔서 감사합니다.
글쓰기 내용중 제목이나 내용에 주민번호, 카드번호 와 같은
신상정보 입력을 금지하려고 아래와 같이 했는데 반응이 없어서..
머가 틀렸을까 좀 고수님들의 부탁드립니다.


function fwrite_check(f)
{
    var s = "";
    if (s = word_filter_check(f.wr_subject.value)) {
        alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
        return;
    }

    if (s = word_filter_check(f.wr_content.value)) {
        alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
        return;
    }

   

    if (char_min > 0 || char_max > 0)
    {
        var cnt = parseInt(document.getElementById('char_count').innerHTML);
        if (char_min > 0 && char_min > cnt)
        {
            alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
            return;
        } else if (char_max > 0 && char_max < cnt)
        {
            alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
            return;
        }
    }

<-- 여기서 부터 -->

tmp_content = f.wr_content.value;
tmp_content = tmp_content.replace(/\s/g,'');
tmp_content = tmp_content.replace(/&nbsp;/g,'');
tmp_content = tmp_content.replace(/-/g,'');
tmp_content = tmp_content.replace(/\\/g,'');
tmp_content = tmp_content.replace(/\//g,'');

tmp_title = f.wr_Subject.value;
tmp_title = tmp_title.replace(/\s/g,'');
tmp_title = tmp_title.replace(/&nbsp;/g,'');
tmp_title = tmp_title.replace(/-/g,'');
tmp_title = tmp_title.replace(/\\/g,'');
tmp_title = tmp_title.replace(/\//g,'');

if(tmp_title.search(/\d{6}\-\d{7}/) != -1 || tmp_title.search(/\d{13}/) != -1 || tmp_title.search(/\d{4}\-\d{4}\-\d{4}\-\d{4}/) != -1 || tmp_title.search(/\d{16}/) != -1)
{
alert('글 제목에 개인정보 노출 위험이 있습니다.\n\n개인정보(주민등록번호,신용카드번호)는 등록이 불가합니다.');

return;
}

if(tmp_content.search(/\d{6}\-\d{7}/) != -1 || tmp_content.search(/\d{13}/) != -1 || tmp_content.search(/\d{4}\-\d{4}\-\d{4}\-\d{4}/) != -1 || tmp_content.search(/\d{16}/) != -1)
{
alert('글 내용에 개인정보 노출 위험이 있습니다.\n\n개인정보(주민등록번호,신용카드번호)는 등록이 불가합니다.');
return;
}


<-- 요기 까지 -->

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT