aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-02-17 02:41:57 +0000
committerrvelices <rv-github@modusoptimus.com>2006-02-17 02:41:57 +0000
commit08b63815640b2fc8059c243a4f9feaf865801a25 (patch)
tree9d85b271d0857dd898d61883258d11986071c367 /include/functions_category.inc.php
parentf27bd8558af02ec510137a196b874c87925e14bb (diff)
fix: remote site decodes html entities from xml and addslashes
fix: picture displays "image rank/total" images even for non numeric categories fix: category comment not transformed with nl2br if allow_html_descriptions and comment already looks like html git-svn-id: http://piwigo.org/svn/trunk@1046 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 548e5fe35..b3abce892 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -160,7 +160,12 @@ SELECT '.implode(',', $infos).'
$cat[$info] = get_boolean( $cat[$info] );
}
}
- $cat['comment'] = nl2br($cat['comment']);
+ global $conf;
+ if ( !( $conf['allow_html_descriptions'] and
+ preg_match('/<(div|br|img).*>/i', $cat['comment']) ) )
+ {
+ $cat['comment'] = nl2br($cat['comment']);
+ }
$names = array();
$query = '