fõo ''', options={'numeric-entities':1}) print document print errors Configuration options ===================== The Python interface allows you to pass options directly to HTML Tidy. For a complete list of options, see the `HTML Tidy Configuration Options Quick Reference`_ or, from the command line, run ``tidy -help-config``. .. _`HTML Tidy Configuration Options Quick Reference`: http://api.html-tidy.org/ This module sets certain default options, as follows:: BASE_OPTIONS = { "indent": 1, # Pretty; not too much of a performance hit "tidy-mark": 0, # No tidy meta tag in output "wrap": 0, # No wrapping "alt-text": "", # Help ensure validation "doctype": 'strict', # Little sense in transitional for tool-generated markup... "force-output": 1, # May not get what you expect but you will get something } If you do not like these options to be set for you, do the following after importing ``tidylib``:: tidylib.BASE_OPTIONS = {} Function reference ================== .. autofunction:: tidylib.tidy_document .. autofunction:: tidylib.tidy_fragment .. autofunction:: tidylib.release_tidy_doc .. _`HTML Tidy`: http://www.html-tidy.org/ .. _`PyTidyLib`: http://countergram.github.io/pytidylib/