Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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
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.
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
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 "
, and let Textpattern handle the technical clumsinesses. Might not be applicable to legacy data, of course.
Offline