diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index e3afbb8ded..a57d062ec6 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -3621,16 +3621,21 @@ function html_print_timezone_select($name, $selected='')
* Enclose a text into a result_div
*
* @param string Text to enclose
+ * @param boolean Return formatted text without html tags.
*
* @return string Text inside the result_div
*/
-function html_print_result_div($text)
+function html_print_result_div($text, $text_only)
{
$text = preg_replace('/', '<', $text);
$text = preg_replace('/>/', '>', $text);
$text = preg_replace('/\n/i', '
', $text);
$text = preg_replace('/\s/i', ' ', $text);
+ if ($text_only) {
+ return $text;
+ }
+
$enclose = "
'.$data[__('Data')].'', + ]; + } else { + $row = [ + $data[__('Date')], + $data[__('Data')], + ]; + } } } else { $row = [ @@ -2181,15 +2190,16 @@ function reporting_html_historical_data($table, $item, $pdf=0) $table1, true ); + + return html_print_table($table, true); } else { $table1->title = $item['title']; $table1->titleclass = 'title_table_pdf'; $table1->titlestyle = 'text-align:left;'; - return html_print_table( - $table1, - true - ); + + return html_print_table($table1, true); } + } @@ -2234,6 +2244,11 @@ function reporting_html_database_serialized($table, $item, $pdf=0) } else { $data_unserialized[$key] = wordwrap(io_safe_input($data_value), 60, "
'.$data_value.''; } }