def html4annotation(htmlpage, baseurl=None, proxy_resources=None):
    """Convert the given html document for the annotation UI

    This adds tags, removes scripts and optionally adds a base url
    """
    htmlpage = add_tagids(htmlpage)
    cleaned_html = descriptify(htmlpage, baseurl, proxy=proxy_resources)
    return cleaned_html
Convert the given html document for the annotation UI

    This adds tags, removes scripts and optionally adds a base url
    
slyd/slyd/html_utils.py