From bf88d37dcf7c80fe8f0aec0ba053ae97bb1b5d50 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 27 Nov 2021 18:17:07 +0100 Subject: [PATCH] fix replacement limit --- CHANGELOG.md | 2 ++ inc/lib.epc.php | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f89c38..845eed2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ dev - [ ] add auto-find post title in content +- [ ] add auto-find categorie +- fix remplacement limit 2021.10.06 - update translations (and remove .lang.php file) diff --git a/inc/lib.epc.php b/inc/lib.epc.php index ac4f56a..4782b17 100644 --- a/inc/lib.epc.php +++ b/inc/lib.epc.php @@ -135,7 +135,10 @@ class libEPC && is_array($filter->tplValues) && in_array($tag, $filter->tplValues) && $args[0] != '' //content - && empty($args[2]) // remove html + && empty($args['encode_xml']) + && empty($args['encode_html']) + && empty($args['remove_html']) + && empty($args['strip_tags']) ; } @@ -143,7 +146,7 @@ class libEPC { # Limit if ($filter->limit > 0) { - $limit = in_array($filter->id() . '_' . $p, self::$epcFilterLimit) ? self::$epcFilterLimit[$filter->id() . '_' . $p] : $filter->limit; + $limit = array_key_exists($filter->id() . '_' . $p, self::$epcFilterLimit) ? self::$epcFilterLimit[$filter->id() . '_' . $p] : $filter->limit; if ($limit < 1) { return $s; }