Search…

X3 Photo Gallery Support Forums

Search…
 
igor.bezkrovny
Topic Author
Posts: 16
Joined: 02 Aug 2012, 08:00

HTML Gallery - description issue

18 Aug 2012, 17:27

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
Attachments
after_fix.png
screenshot after fix
after_fix.png (70.56 KiB) Viewed 1959 times
before_fix.png
screenshot before fix
before_fix.png (86.5 KiB) Viewed 1959 times
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: HTML Gallery - description issue

21 Aug 2012, 03:59

Good point, we'll implement it for the next release, thanks. However most of the browsers ignore newlines in link titles anyway.
firedev.com
 
igor.bezkrovny
Topic Author
Posts: 16
Joined: 02 Aug 2012, 08:00

Re: HTML Gallery - description issue

21 Aug 2012, 04:07

Thanks!