본문 바로가기 메뉴 바로가기

말랑말랑슈가

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

말랑말랑슈가

검색하기 폼
  • 분류 전체보기 (148)
    • Devolopment (55)
      • 알고리즘 관련 (4)
      • OS 관련 (3)
      • C, C++ (11)
      • Python (9)
      • Javascript (3)
      • JAVA (8)
      • SQL (7)
      • 데이터마이닝 (3)
      • 기타 (7)
    • 나란인간 (2)
    • Windows Tip (7)
    • 자격증 (5)
    • 헬조선 (4)
    • Movie, Anime, Music (22)
    • 웃지않고는 못배기지 (2)
    • 수혜자들 (4)
    • 귀욤터짐 (1)
    • 잡담 (8)
    • Naver Blog Backup (31)
    • 각종정보 (7)
  • 방명록

StrippingParser (1)
STRIP TAGS AND JAVASCRIPT FROM HTML PAGE, LEAVING ONLY SAFE TAGS (PYTHON RECIPE)

URL: http://code.activestate.com/recipes/52281/ Sometimes we are getting HTML input from the user. We want to only allow valid, undangerous tags, we want all tags to be balanced (i.e. an unclosed will leave all text on your page bold), and we want to strip out all Javascript. This recipe demonstrates how to do this using the sgmllib parser to parse HTML. Python, 59 lines Download import sgmllib,..

Devolopment/Python 2020. 3. 17. 14:35
이전 1 다음
이전 다음
반응형
최근에 달린 댓글

Blog is powered by Tistory / Designed by Tistory

티스토리툴바