diff options
author | Thomas Lange <code@nerdmind.de> | 2017-05-05 03:08:54 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2017-05-05 03:08:54 +0200 |
commit | 9025d07767b19bb3d0f694c5c39b61446b4917a1 (patch) | |
tree | 2c22cb5265adab5b9adc5b9f78866b271408f097 | |
parent | 796ea918866c15f0d59ce178d095022edfaf096d (diff) | |
download | blog-9025d07767b19bb3d0f694c5c39b61446b4917a1.tar.gz blog-9025d07767b19bb3d0f694c5c39b61446b4917a1.tar.xz blog-9025d07767b19bb3d0f694c5c39b61446b4917a1.zip |
Prevent "$ITEM['BODY']['HTML']()" which is a closure since version 2.1 from calling twice.
-rw-r--r-- | template/standard/html/feed/item_page.php | 6 | ||||
-rw-r--r-- | template/standard/html/feed/item_post.php | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/template/standard/html/feed/item_page.php b/template/standard/html/feed/item_page.php index 25d7d30..4935282 100644 --- a/template/standard/html/feed/item_page.php +++ b/template/standard/html/feed/item_page.php @@ -6,6 +6,8 @@ # [see documentation] # # # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# + +$HTML = $PAGE['BODY']['HTML'](); ?> <item> <title><?=escapeHTML($PAGE['ATTR']['NAME'])?></title> @@ -13,10 +15,10 @@ <guid isPermaLink="false"><?=$PAGE['GUID']?></guid> <pubDate><?=parseDatetime($PAGE['ATTR']['TIME_INSERT'], '[RFC2822]')?></pubDate> <dc:creator><?=escapeHTML($USER['ATTR']['FULLNAME'])?></dc:creator> - <description><?=escapeHTML(description($PAGE['BODY']['HTML'](), 400))?></description> + <description><?=escapeHTML(description($HTML, 400))?></description> <content:encoded> <![CDATA[ - <?=$PAGE['BODY']['HTML']()?> + <?=$HTML?> ]]> </content:encoded> <?php foreach($PAGE['FILE']['LIST'] as $fileURL): ?> diff --git a/template/standard/html/feed/item_post.php b/template/standard/html/feed/item_post.php index 7f477d6..30e97ab 100644 --- a/template/standard/html/feed/item_post.php +++ b/template/standard/html/feed/item_post.php @@ -6,6 +6,8 @@ # [see documentation] # # # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# + +$HTML = $POST['BODY']['HTML'](); ?> <item> <title><?=escapeHTML($POST['ATTR']['NAME'])?></title> @@ -13,10 +15,10 @@ <guid isPermaLink="false"><?=$POST['GUID']?></guid> <pubDate><?=parseDatetime($POST['ATTR']['TIME_INSERT'], '[RFC2822]')?></pubDate> <dc:creator><?=escapeHTML($USER['ATTR']['FULLNAME'])?></dc:creator> - <description><?=escapeHTML(description($POST['BODY']['HTML'](), 400))?></description> + <description><?=escapeHTML(description($HTML, 400))?></description> <content:encoded> <![CDATA[ - <?=$POST['BODY']['HTML']()?> + <?=$HTML?> ]]> </content:encoded> <?php foreach($POST['FILE']['LIST'] as $fileURL): ?> |