Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-26 19:32:01

immarabi
Member
Registered: 2008-04-29
Posts: 57

[resolved] [Solved] validation issues for quotes in image alt text

hi all,

I just updated my site to 4.0.8 and now my alt text for images doesn’t display quotes correctly. In the previous version (4.0.6) I was using, if you wanted to put a quote in the alt text or caption you have to use the correct HTML markup (I was using " otherwise it doesn’t show up.

But when I upgraded to 4.0.8 the alt text displays " (or the ASCII “) instead of what it should show “

So I changed the all the correct HTML to just “, and now it looks fine in the alt, but it is not valid HTML anymore because the alt text gets parsed in the middle.

Is this a bug, or is there something wrong with the way I did the upgrade?

I just installed a band new textpattern 4.0.8 and I do not have this problem on this other site. I just type in “ in the alt text and it displays a “ on the page and it automatically changes the code to valid HTML so the page validates.

Please, I would love any help on this.

thanks!

Offline

#2 2009-02-26 19:57:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: [resolved] [Solved] validation issues for quotes in image alt text

HTML escaping was changed in 4.0.7. It is now escaped by default so if you want to preserve the old behaviour you should add escape="" to your <txp:image /> (or thumbnail) tags.

For reference, this change also affects these other tags


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2009-02-26 20:08:01

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: [resolved] [Solved] validation issues for quotes in image alt text

So you are saying there is no way to have valid HTML pages when you want to display a quote with 4.0.8, without reverting to the old behaviour of 4.0.6?

Offline

#4 2009-02-26 22:13:32

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: [resolved] [Solved] validation issues for quotes in image alt text

immarabi wrote:

So you are saying there is no way to have valid HTML pages when you want to display a quote with 4.0.8, without reverting to the old behaviour of 4.0.6?

You just need to add escape=”“ to your image or thumbnail tags.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2009-02-27 04:14:35

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: [resolved] [Solved] validation issues for quotes in image alt text

Thanks you two!

Sometimes it takes someone saying the same thing a second time for me to get it.

Offline

#6 2009-02-27 06:47:02

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: [resolved] [Solved] validation issues for quotes in image alt text

immarabi wrote:

So you are saying there is no way to have valid HTML pages when you want to display a quote with 4.0.8, without reverting to the old behaviour of 4.0.6?

There is a way: Use a literal quote " whereever you want to, not the entity &quot;, and let Textpattern handle the technical clumsinesses. Might not be applicable to legacy data, of course.

Offline

Board footer

Powered by FluxBB