Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-06-26 18:51:12

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Article title and '&' or '&' strings

Some wrong in store title in db.

1. In admin Write Tab Create article with title qq & ww save. In DB all OK, field title is qq & ww. (textile_body was use_textile).

2. In admin Write Tab set textile_bodyLeave text... – save. In DB it stored as qq & ww WHY ?

3. In admin Write Tab set textile_bodyLeave text... and set title qq & ww – save. In DB – qq & ww

4. Press button “Save” twice – in DB qq & ww ??

If title stored in db as qq & ww then generate wrong html code with <txp:title /> tag. :(

ps: Textpattern · 4.2.0

Please, move my topic to http://forum.textpattern.com/viewforum.php?id=31

Last edited by makss (2010-06-27 00:14:23)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#2 2010-07-08 09:36:00

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: Article title and '&' or '&amp;' strings

Does anybody can to confirm or refute this bug?


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#3 2010-07-08 10:02:31

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

Re: Article title and '&' or '&amp;' strings

makss

1 & 2) Textile_body actually means “Textile body and Title”. Every time you save an article, the Body and Title are adjusted based on the setting in the Article Markup dropdown

3 &4) I guess when you set the entity and it’s loaded back into the browser it’s being decoded for display and then not re-encoded on subsequent Saves so it’s being stored as a raw ampersand

Suppose 3&4 could be termed a bug but I don’t really know much about this area. Perhaps someone else can propose a fix?


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

#4 2010-07-08 10:43:45

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: Article title and '&' or '&amp;' strings

I do not understand logic in Title field. :(
That from textile used in Title? How can I use textile in Title? Is textile for what needed in Title?

Maybe remove textile support from Title? :-D It’s joke, but… :)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#5 2010-07-08 11:25:55

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

Re: Article title and '&' or '&amp;' strings

Oh, wait. No, you’re right.

The ampersand encoding has nothing to do with Textile does it? Then I guess what you’re seeing is all related to the fact that the entities are being decoded (for display) and not re-encoded (for storage). Or something like that. Hmmmmm.

Last edited by Bloke (2010-07-08 11:26:50)


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

Board footer

Powered by FluxBB