<s> import re <EOL> from urlparse import urlparse <EOL> def check_url ( form , field ) : <EOL> """<STR_LIT>""" <EOL> url = field . data . strip ( ) <EOL> if not url : <EOL> return <EOL> result = urlparse ( url ) <EOL> if result . scheme == "<STR_LIT>" : <EOL> field . data = "<STR_LIT>" % re . sub ( r'<STR_LIT>' , '<STR_LIT>' , url ) </s>
