Strange characters on captions

Posted in: Newspaper
Post count: 67

Hello,

We have our website in Spanish and our language uses accents and special characters. When we use them in a image caption, it’s showed fine under the photo, but when you click on the photo and it opens in a lightbox, the captions show wrong characters.

How can we solve this?

Thank you.

Post count: 9544

Simplest way is to ASCII encode your captions with the characters, but it could be bug in the encoding for the lightbox, which Marius or Lucian will address once they are back for support duties 🙂

Post count: 67

OK, Christopher.
I think we should wait for a deeper fix, because introducing ASCII code every time we add a caption is not a good solution. Please, let us know when it is fixed.
Regards.
Juan.

Post count: 6600

Hi,

If you refer to this: http://screencast.com/t/z2lEpgiVu
Please try this: http://screencast.com/t/rowzW5Npd

htmlentities($image_attachment['caption'], ENT_QUOTES)

Thanks

Post count: 67

Hello, Lucian.

As you can see here, it doesn’t work:

http://marronyblanco.com/jornada-melco-aecoc/

Post count: 6600

Hi,

All captions from this post look good to me, no strange characters:

* http://screencast.com/t/vOaoTEljuwDs
* http://screencast.com/t/yjEfXEY81I
* http://screencast.com/t/3UwGclkpoIW

Thanks

Post count: 67

Yes, Lucian. In the gallery are working.
But when you click on the main image of the post, the featured image over the title, the characters look bad.

Post count: 9544

Yes, I see that in the lightbox popup also; looks like high ascii characters not getting encoded for HTML:

José María Sosa y Carlos Torme, de Aecoc, junto a Alberto Alonso y Esperanza Hernández, de Aude Events

Post count: 6600

Hi,

Please replace this line: http://screencast.com/t/QFUMG62mx4Ux with this htmlentities($featured_image_info['caption'], ENT_QUOTES)
…like this: http://screencast.com/t/bQhfU3qIu

Thanks

Post count: 67

Hello,

I’ve done it and all my website has broken.

I’ve returned to the previous configuration.

The captions are not working properly.

Pleas, send us a solution.

Post count: 6600

Hi,

Please make sure you do this right: http://screencast.com/t/FGwF88NotUv
Replace just the line highlighted in the screenshot with this:

htmlentities($featured_image_info['caption'], ENT_QUOTES)

I have tested this and should work fine: http://screencast.com/t/2iH4CRKI5KZL

Thanks

Post count: 67

Done. Thank you very mach! And thank you for your patience.

Post count: 67

Ups. I’m sorry biut is breaking my web. Maybe it’s a conflict with some plugin. When I do the change, I can’t access to wp-admin and a lot of posts are not showed.
I don’t know why.
Another solution?

Post count: 6600

Hi,

To make sure that you do this right please make sure you replace the content of the td_module_blog.php file with this: http://pastebin.com/bZsZvQAn
Also make sure you update the theme to the latest version(4.5) after that replace the td_module_blog.php file content, deactivate all plugins and check for this issue again.

Thanks

Post count: 67

Hi Lucian,

I’m sorry but it’s not working. If I add this code, the caption is shown wrongly, with strange characters.

Maybe we should try a different thing.

Thank you in advance.

Post count: 6600

Hi,

Please try to add this function like this: http://screencast.com/t/SQIf30mRu6O

str_replace(array('"', "'"), array('`'), $featured_image_info['caption'])

Thanks

Post count: 67

Hello,

As you can see, it doesn’t work if you click on the featured image:

http://marronyblanco.com/jornada-melco-aecoc/

Any other solution for that?

Post count: 6600

Hi,

Please try this: http://screencast.com/t/TPWqFMtFCOp
Hope this fixes it as I have tested this several times now and haven’t had any issue with this, please make sure you also empty cache after changing this: http://screencast.com/t/oVOe9rgh2s

Thanks

Post count: 67

Thank you, Lucian.

Now is working fine.

It could be possible tyo add this by default in the next update of the theme?

Regards.

Mònica.

Post count: 6600

Glad it works! I have added this on our todo list and we will investigate and fix this in next updates.

Thanks

Viewing 20 posts - 1 through 20 (of 20 total)
The forum ‘Newspaper’ is closed to new topics and replies.