Invalid URLs for "Edit" links

Found a bug? Tell us!!
Post Reply
Manko10
Regular
Posts: 50
Joined: Sun Dec 26, 2010 4:58 pm

Invalid URLs for "Edit" links

Post by Manko10 »

Hey guys!

The generated links for editing individual articles or sidebar plugins contain invalid characters.

The URLs look like this:

Code: Select all

http://www.example.com/serendipity_admin.php?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]=123
The square brackets are interpreted as array operators by PHP and therefore perfectly acceptable, but as such they're invalid URL characters and must therefore be URL encoded as %5B and %5D.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Invalid URLs for "Edit" links

Post by garvinhicking »

Hi!

Yeah, but this works in all browsers. We happily accept patches for this, but it's too much work to check in all places. If you have exact places or can provide a patch, we can commit this.

Otherwise, the work to fix this is in no relation to what it really "fixes" so it's really ultralow-priority for me.

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/
Manko10
Regular
Posts: 50
Joined: Sun Dec 26, 2010 4:58 pm

Re: Invalid URLs for "Edit" links

Post by Manko10 »

Is this really in so many places? I just discovered it in these two cases: editing blog entries where I worked around it in the template with

Code: Select all

<a href="{$entry.link_edit|replace:"[":"%5B"|replace:"]":"%5D"}">{$CONST.EDIT_ENTRY}</a>
and for the sidebar modules where I don't have control over the links from the template.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Invalid URLs for "Edit" links

Post by garvinhicking »

Hi!

Doing such a replace is a bit nasty, we would need to do that at the place were it occurs, and also make sure it doesn't break things (link_edit should only be used in href's, if its used in input names, this would make problems).

Really, I think this is more of a non-issue and cosmetic thing...that would possibly cause more trouble than it solves.

Regads,
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/
Post Reply