Freetags: Cannot save keywords

Found a bug? Tell us!!
Post Reply
ascger
Posts: 1
Joined: Sat Jan 07, 2012 1:07 pm

Freetags: Cannot save keywords

Post by ascger »

I have a small bugfix suggestion: I could'nt save keywords in the backend of the freetag plugin. When I submitted the form nothing happend - the page simply reloaded without saving anything.

Problem was: Names of the input fields (serendipity[tag] and serendipity[keywordsubmit]) are escaped ("%5Btag%5D" instead of "[tag]") which seems not to be working (at least with Chrome). Changing these names in serendipity_event_freetags.php in lines 1867 and 1868 solved the problem.

Serendipity: 1.6
Freetag: 3.35
PHP: 5.3.6
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Freetags: Cannot save keywords

Post by garvinhicking »

Hi!

Very good catch, thanks a lot. I just committed the fix!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Freetags: Cannot save keywords

Post by blog.brockha.us »

Hmm.. If you look at this is this a good fix? Shouldn't brackets be escaped in links?
Perhaps Chrome is wrong here?

Or do I misunderstand something?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Freetags: Cannot save keywords

Post by garvinhicking »

Hi!

[] only must be encoded within <a href>, not within input name's; this was improperly changed in the plugin by me, so I reverted it.

Everytime we use "[" or "]" in a <a href=""> or <img src=""> or <script src=""> we would need to use %5D/%5B instead, however all browsers properly translate this already.

The other way around, having %5D in input names however screwp the logic up, so a browser does not atually transport [ and ] to the server.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Freetags: Cannot save keywords

Post by blog.brockha.us »

Ah, thanks for clearing that for me. :)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Post Reply