2008-12-11から1日間の記事一覧

BeautifulSoupで簡単に危険なタグをエスケープ

閉じてないタグを閉じたり、タグ名を小文字にしたりというような副作用もあるわけですが。 from BeautifulSoup import BeautifulSoup import cgi dangerous_tags = [ "script", "applet", "object", "embed", "img", "form", "input", "select", "textarea",…