일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- grafana windows
- url 파일 다운로드
- java file download for path
- spring boot
- grafana local
- jvm
- 그라파나 설치
- windows grafana 설치
- JavaScript
- java9
- MySQL
- React
- SpringBoot
- Java21
- CentOS6
- java 버전별
- k6 granafa influxdb
- spring file download for path
- java file download for url
- grafana 설치
- 도커
- docker
- memcached
- docker 설치
- spring
- java8
- k6 gui
- Java
- 리눅스
- spring file download for url
Archives
- Today
- Total
개발자의 길
[javascript] html 태그 삭제 본문
//input - 글 내용
//allowed - 예외 태그
function strip_tags (input, allowed) {
allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('');
// making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
return input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''; });
}
'2. JS' 카테고리의 다른 글
jQuery 를 이용한 두 줄 이상 말줄임 적용(multi ellipsis) 소스 (0) | 2013.04.30 |
---|---|
[javascript] 트위터 결과 받아오기 - callback (0) | 2013.02.01 |
[javascript] url 복사 클립보드-익스,파폭,크롬 (2) | 2013.01.02 |
[javascript] Jquery 와 Prototype 같이 쓰기 (0) | 2012.11.02 |
[javascript] onload 의 여러가지 기법 (0) | 2012.06.27 |
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.
Comments