"""Utilities for working with HTML."""
#import html5lib
from html5lib import sanitizer, serializer, tokenizer, treebuilders, treewalkers, HTMLParser
"""Utilities for working with HTML."""
#import html5lib
from html5lib import sanitizer, serializer, tokenizer, treebuilders, treewalkers, HTMLParser
+from urllib import quote_plus
from django.utils.html import strip_tags
from forum.utils.html2text import HTML2Text
from django.utils.safestring import mark_safe
from django.utils.html import strip_tags
from forum.utils.html2text import HTML2Text
from django.utils.safestring import mark_safe
return u''.join(output_generator)
def cleanup_urls(url):
return u''.join(output_generator)
def cleanup_urls(url):
+ return quote_plus(strip_tags(url))
def html2text(s, ignore_tags=(), indent_width=4, page_width=80):
def html2text(s, ignore_tags=(), indent_width=4, page_width=80):