Single quotes in titles causes bad HTML

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Single quotes in titles causes bad HTML

Ikwilhet
My images have titles with single quotes and double quotes.
I have activate "Shadowbox JS - Use Title from Image" plugin.
The single quotes in my titles are causing bad HTML output and broken galleries.
Is there a workaround for this problem?

In my native language (Dutch) single quotes are quite common.
Reply | Threaded
Open this post in threaded view
|

Re: Single quotes in titles causes bad HTML

manfer
I can include single quotes in titles and works fine with any of these methods:

<a href="foo.jpg" rel="shadowbox" title="foo' photo">foo</a>

with scaped single quote
<a href="foo.jpg" rel="shadowbox" title="foo\' photo">foo</a>

with character encoding
<a href="foo.jpg" rel="shadowbox" title="foo&apos; photo">foo</a>

So that must be a bug in that plugin you mention "Shadowbox JS - Use Title from Image", a wordpress plugin developed by Matt Martz
Reply | Threaded
Open this post in threaded view
|

Re: Single quotes in titles causes bad HTML

manfer
The problem is on the patterns and replace code in that plugin. Something is wrong.

Reply | Threaded
Open this post in threaded view
|

Re: Single quotes in titles causes bad HTML

manfer
If you understand how to do what is explained in the linked article bellow, your problem should be fixed.

Bug in Shadowbox JS – Use Title from Image
http://www.manfersite.tk/bug-shadowbox-js-title-image
Reply | Threaded
Open this post in threaded view
|

Re: Single quotes in titles causes bad HTML

HenzeBerkheij
In reply to this post by Ikwilhet
you should use htmlentities (php) when you print the html code for the images...then there will be no singlequotes but simply an htmlentitie coding wich will tell the browser there was really a singlequote here...