Apex not showed in alt/title tag

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Dec 09, 2014 4:29 pm
Reply with quote
Report this post
When you go over an image with your mouse and the image is related to a k2 item with a title-text that contains an apex, then the apex is showed as ' instead of '.
Please have a look at the image attached.
gavick-apex.jpg

It should display "L'evoluzione ..." instead of "L&#039evoluzione ..."
You can check that online by visiting www.casino-online.bz/scommesse with username gavick and password gavick
User avatar
Expert Boarder

teitbite
Thu Dec 11, 2014 1:32 pm
Reply with quote
Report this post
Hi

I edited /html/com_k2/templates/default/category_item.php line 19 and replaced:

Code: Select all
            <div class="itemImageBlock"> <a class="itemImage" href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> </div>


with these:

Code: Select all
            <div class="itemImageBlock"> <a class="itemImage" href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> </div>
User avatar
Moderator

GK User
Thu Dec 11, 2014 3:22 pm
Reply with quote
Report this post
I prefer edit php files only if there are no other solutions.
Will you add such fix to next template update?
User avatar
Expert Boarder

teitbite
Sun Dec 14, 2014 8:06 pm
Reply with quote
Report this post
Hi

That was the only option. But problem is comming from K2. This function is chaning special chars to ASCII codes K2HelperUtilities::cleanHtml(). All I've done was to remove this function. It's ok with Your site, because You do not have HTML code in captions, but some users may not be happy not having this function. Anyway You can report this to K2 support, so they will correct this function.
User avatar
Moderator

GK User
Mon Dec 15, 2014 6:35 pm
Reply with quote
Report this post
I updated k2 from 2.6.8 to 2.6.9 and this problem has been solved.
User avatar
Expert Boarder

teitbite
Thu Dec 18, 2014 4:38 pm
Reply with quote
Report this post
Hi

Ok. Great to hear that, but I've changed this code in overrides, so even if it was updated and fixed than my solution is in use :)
User avatar
Moderator


cron