summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-07-10 13:40:06 +0200
committerGitHub <noreply@github.com>2017-07-10 13:40:06 +0200
commit3b943589b3d78731460895c7f02886bebdb76b45 (patch)
treefa2eb1cf12d177b93d0b0e92844d513bff8f6de4 /system/libraries
parentaa8ca65ac7ca3afda3331a5da16297e7afeeecbe (diff)
parentb344273d2aa61457d0119f0b224d400b8de65654 (diff)
[ci skip] Merge pull request #5128 from lloricode/profiler-pre-tag
Profiler add pre tag
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Profiler.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index 9ea09a529..cb3eaed75 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -484,13 +484,19 @@ class CI_Profiler {
foreach ($this->CI->config->config as $config => $val)
{
+ $pre = '';
+ $pre_close = '';
+
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
+
+ $pre = '<pre>' ;
+ $pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
- .$config.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."</td></tr>\n";
+ .$config.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n";
}
return $output."</table>\n</fieldset>";
@@ -516,13 +522,19 @@ class CI_Profiler {
foreach ($this->CI->session->userdata() as $key => $val)
{
+ $pre = '';
+ $pre_close = '';
+
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
+
+ $pre = '<pre>' ;
+ $pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
- .$key.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."</td></tr>\n";
+ .$key.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n";
}
return $output."</table>\n</fieldset>";