Page 1 of 1

HTML Gallery - description issue

Posted: 18 Aug 2012, 17:27
by igor.bezkrovny
Hi,

tested on: ImageVueX 2.8.1 and 2.8.2,
URL: http://littlekat.com.ua/?

Subject: HTML Gallery, thumbnails mode, image description
Problem: If image description(image title was not tested) contains html tag < b r / >, HTML Gallery makes strip_tags, which removes new line tag away.
Description example: интеллигент в галстуке<br />Размер: 9 х 20 см
Possible fix:
1) add next function:
Code
    function br2nl2($str) {
        return preg_replace('#<br\s*/?>#i', "\n", $str);
    }
2) file iv-includes/templates/default/index.html.phtml, line 127:

now:
Code
title="<?php echo htmlspecialchars(strip_tags(t($this->useLightview ? $item->title : $item->description))); ?>">
fixed:
Code
title="<?php echo htmlspecialchars(strip_tags(br2nl2(t($this->useLightview ? $item->title : $item->description)))); ?>">
Thanks

Re: HTML Gallery - description issue

Posted: 21 Aug 2012, 03:59
by Nick
Good point, we'll implement it for the next release, thanks. However most of the browsers ignore newlines in link titles anyway.

Re: HTML Gallery - description issue

Posted: 21 Aug 2012, 04:07
by igor.bezkrovny
Thanks!