10.3 Closing Lone HTML Element

HTML elements with an opening element, but no closing element, such as <img> or <link> should be closed by calling close_html_lone_element:

Function: $html_element = $converter->close_html_lone_element ($unclosed_element)

Close the $unclosed_element, which can contain attributes, by prepending ‘>’ or ‘/>’ depending on the USE_XML_SYNTAX customization variable value.

Examples of use:

$description = $converter->close_html_lone_element(
    "<meta name=\"description\" content=\"$description\"");