function forena_clean_xhtml in Forena Reports 7.2
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.5 forena.admin.inc \forena_clean_xhtml()
- 7 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
1 call to forena_clean_xhtml()
- forena_data_block_add in ./
forena.admin.inc - submit handler for forena_data_block_form. This adds the datablock to an existing report.
File
- ./
forena.admin.inc, line 2243
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;
}