ZenphotoCMS Forum
printLatestImages() unclosed html tags. - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: printLatestImages() unclosed html tags. (/thread-7931.html)



printLatestImages() unclosed html tags. - madmanu - 2010-12-08

Hi,

When using the function printLatestImages() or printLatestImagesByDate() in my theme, and setting a limit to the description length, html tags that were open at the character limit remain opened after the function is done, affecting the rest of the layout.

I have temporarily solved this by changing in image_album_statistics.php line 445.

From:

Quote:echo "".truncate_string($image->getDesc(), $desclength)."";
To:

Quote:echo "".truncate_string(strip_tags($image->getDesc()), $desclength)."";
If this is normally done without modifying the core, please let me know. Realize I want my full descriptions to at least accept certain tags (strong, em,...).

If there is no other way to do that, then let it be a temporary solution for whomever has the same problem.




printLatestImages() unclosed html tags. - acrylian - 2010-12-08

Yes, actually it should use this function http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionshortenContent

Probably we just forgot that it didn't already. We will change that.