method string.html_to_xhtml
Contract
Return typestring
Parameter keyDefault valueType
add_headingfalseboolean
Water Contract
<method string.html_to_xhtml
  add_heading=false
  _return_type=string/>
html_to_xhtml returns a cleaned-up, xhtml-ized version of its input string. Improper syntax like unbalanced ending tags, improper nesting, and a bunch of other syntactically broken constructs are fixed. If add_heading is true, the output will be enclosed with <html> <body> </body> </html> Otherwise no extra outer tags will be added to the input. If the input happens to already contain an HTML tag, add_heading will have no effect and the original HTML tag will be preserved. add_heading has a default of false . This method uses the Tidy program in its implementation.