function forena_clean_xhtml in Forena Reports 8
Same name and namespace in other branches
- 6.2 forena.admin.inc \forena_clean_xhtml()
- 6 forena.admin.inc \forena_clean_xhtml()
- 7.5 forena.admin.inc \forena_clean_xhtml()
- 7 forena.admin.inc \forena_clean_xhtml()
- 7.2 forena.admin.inc \forena_clean_xhtml()
- 7.3 forena.admin.inc \forena_clean_xhtml()
- 7.4 forena.admin.inc \forena_clean_xhtml()
Clean xhtml
Parameters
unknown_type $xhtml:
Return value
unknown
File
- forena_ui/
forena.admin.inc, line 532
Code
function forena_clean_xhtml($xhtml) {
$ret = $xhtml;
// If tidy is installed lets clean the html using that.
if (is_callable('tidy_repair_string')) {
$config = array(
'doctype' => 'omit',
'indent-spaces' => 2,
'indent' => 'auto',
'input-xml' => TRUE,
'output-xml' => TRUE,
'indent-attributes' => FALSE,
'add-xml-space' => TRUE,
'wrap' => 135,
);
$ret = tidy_repair_string($xhtml, $config, 'utf8');
}
else {
$ret = str_replace(' ', ' ', $ret);
}
return $ret;
}