function forena_clean_xhtml in Forena Reports 7.5
Same name and namespace in other branches
- 8 forena_ui/forena.admin.inc \forena_clean_xhtml()
- 6.2 forena.admin.inc \forena_clean_xhtml()
- 6 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.admin.inc, line 823
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,
'indent-spaces' => 2,
'add-xml-space' => TRUE,
'wrap' => 135,
);
$ret = tidy_repair_string($xhtml, $config, 'utf8');
}
else {
$ret = str_replace(' ', ' ', $ret);
}
return $ret;
}