태그부분에  the man's car 라고 입력하면 the man\car 이렇게 입력되고 출력이 됩니다. 

태그부분에  the man's car 라고 입력하면 the man\car 이렇게 입력되고 출력이 됩니다. 

QA

태그부분에  the man's car 라고 입력하면 the man\car 이렇게 입력되고 출력이 됩니다. 

본문

질문:

태그부분에  the man's car 라고 입력하면 the man\car 이렇게 입력되고 출력이 됩니다. 

그리고 다시 한 번 수정하면 the man\\car 라고 수정할 때 마다 \ 한 개씩 더 추가가 됩니다.

그래서 아래와 같이 코드를 수정해 보았는데 원하는 결과 값 the man's car 가 출력이 안됩니다.

어떻게 하면 되나요? 

감사합니다. 

 

 

<!-- 추가 시작 -->

<?php

$as_tag = addslashes($as_tag); 

?>

<!-- 추가 끝 -->

<input type="text" name="as_tag" id="as_tag" value="<?php echo isset($write['as_tag']) ? $write['as_tag'] : ''; ?>" class="form-control" placeholder="콤마(,)로 구분하여 복수 태그 등록 가능">

이 질문에 댓글 쓰기 :

답변 3

<input type="text" name="as_tag" id="as_tag" value="<?php echo isset($write['as_tag']) ? htmlspecialchars($write['as_tag'], ENT_QUOTES, 'UTF-8') : ''; ?>" class="form-control" placeholder="콤마(,)로 구분하여 복수 태그 등록 가능"> 이렇게 수정해서 시도했는데 안됩니다.

 

<input type="text" name="as_tag" id="as_tag" value="<?php echo isset($write['as_tag']) ? str_replace("'", "'", htmlspecialchars($write['as_tag'], ENT_QUOTES, 'UTF-8')) : ''; ?>" class="form-control" placeholder="콤마(,)로 구분하여 복수 태그 등록 가능">

위와 같이 수정해서 해보았는데 안됩니다.

 

답변을 작성하시기 전에 로그인 해주세요.
전체 129,406 | RSS
QA 내용 검색

회원로그인

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