[pmwiki-users] anchor in url prevents editing

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 16 15:04:32 CDT 2007


On Mon, Apr 16, 2007 at 02:46:44PM -0500, JB wrote:
> Hans said:
>  > Where are the broken links coming from?
> 
> It is coming from the browser URL bar when someone is at URL
>    http://gnuzoo.org/test/AdvancedTableDirectives#zebratables
> and they click in the browser URL bar and add "?action=edit".
> 
> PM said:
>  >It should be simply
>  > http://gnuzoo.org/test/AdvancedTableDirectives?action=edit
>  >If you want the #zebratables to be there, it can be
>  > http://gnuzoo.org/test/AdvancedTableDirectives?action=edit#zebratables
> 
> OK, I know what is wrong, but what is a solution?
> I do not want to have to explain to users "do not do it that
> way, do it this way".  Somehow I feel the computer should
> be able to figure out how to adjust to this.

Alas, in this case I don't know of a way to get there from here.

> Can the php config file change the broswer url so it works?

No, because it is the user that is modifying the browser url
(in the browser's address bar).  PHP doesn't have any control over
this.

> Would a rewrite rule in the .htaccess file fix it?

No, it's something that occurs completely within the browser.
The .htaccess file never sees anything that comes after a '#'
in a url (because a browser never sends it).

> Would javascript be needed?  Any other way?

I doubt that even Javascript would be able to correct this one...
but I could be wrong there.  Essentially we'd be asking the
Javascript to override/modify whatever the user types in the 
browser address bar, and a browser that allows that sounds 
like a serious security vulnerability to me.

Pm



More information about the pmwiki-users mailing list