public function convertToString($dom){
		$html = $this->html5->saveHTML($dom);
		$html = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'."\n".$html;
		// Library HTML5 always drop xmlns.
		$html = str_replace('<html', '<html xmlns="http://www.w3.org/1999/xhtml"', $html);
		// Convert entities
		$html = str_replace('&nbsp;', '&#160;', $html);
		// Remove srcset
		$html = preg_replace('/srcset="[^"]*"/', '', $html);
		// Remove rt
		$html = preg_replace('/<rp>[^<]*?<\/rp>/', '', $html);
		// Remove align
		$html = preg_replace('/align="(center|right|left)"/', 'class="text-$1"', $html);
		// fix close tag
		$html = preg_replace('/<(meta|link|img|br|param|hr)([^>]*)?>/u', '<$1$2 />', $html);
		return $html;
	}
public function convertToString($dom){
		$html = $this->html5->saveHTML($dom);
		$html = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'."\n".$html;
		// Library HTML5 always drop xmlns.
		$html = str_replace('<html', '<html xmlns="http://www.w3.org/1999/xhtml"', $html);
		// Convert entities
		$html = str_replace('&nbsp;', '&#160;', $html);
		// Remove srcset
		$html = preg_replace('/srcset="[^"]*"/', '', $html);
		// Remove rt
		$html = preg_replace('/<rp>[^<]*?<\/rp>/', '', $html);
		// Remove align
		$html = preg_replace('/align="(center|right|left)"/', 'class="text-$1"', $html);
		// fix close tag
		$html = preg_replace('/<(meta|link|img|br|param|hr)([^>]*)?>/u', '<$1$2 />', $html);
		return $html;
	}
public function convertToString ( $ dom ) { $ html = $ this -> html5 -> saveHTML ( $ dom ) ; $ html = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . "\n" . $ html ; // Library HTML5 always drop xmlns. $ html = str_replace ( '<html' , '<html xmlns="http://www.w3.org/1999/xhtml"' , $ html ) ; // Convert entities $ html = str_replace ( '&nbsp;' , '&#160;' , $ html ) ; // Remove srcset $ html = preg_replace ( '/srcset="[^"]*"/' , '' , $ html ) ; // Remove rt $ html = preg_replace ( '/<rp>[^<]*?<\/rp>/' , '' , $ html ) ; // Remove align $ html = preg_replace ( '/align="(center|right|left)"/' , 'class="text-$1"' , $ html ) ; // fix close tag $ html = preg_replace ( '/<(meta|link|img|br|param|hr)([^>]*)?>/u' , '<$1$2 />' , $ html ) ; return $ html ; }
Get HTML5 string

@return string
Get HTML5 string