<s> """<STR_LIT>""" <EOL> import logging <EOL> from django import http <EOL> from django . shortcuts import render <EOL> import bleach <EOL> import commonware <EOL> from funfactory . log import log_cef <EOL> from mobility . decorators import mobile_template <EOL> from session_csrf import anonymous_csrf <EOL> log = commonware . log . getLogger ( '<STR_LIT>' ) <EOL> @ mobile_template ( '<STR_LIT>' ) <EOL> def home ( request , template = None ) : <EOL> """<STR_LIT>""" <EOL> data = { } <EOL> log . debug ( "<STR_LIT>" ) <EOL> return render ( request , template , data ) <EOL> @ anonymous_csrf <EOL> def bleach_test ( request ) : <EOL> """<STR_LIT>""" <EOL> allowed_tags = ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> data = { } <EOL> if request . method == '<STR_LIT:POST>' : <EOL> bleachme = request . POST . get ( '<STR_LIT>' , None ) <EOL> data [ '<STR_LIT>' ] = bleachme <EOL> if bleachme : <EOL> data [ '<STR_LIT>' ] = bleach . clean ( bleachme , tags = allowed_tags ) <EOL> if data [ '<STR_LIT>' ] != bleachme : <EOL> log_cef ( '<STR_LIT>' , logging . INFO , request , <EOL> username = '<STR_LIT>' , signature = '<STR_LIT>' , <EOL> msg = '<STR_LIT>' % bleachme ) <EOL> return render ( request , '<STR_LIT>' , data ) </s>
