[OGo-Developer] WOHyperlink href rewriting

Helge Hess developer@opengroupware.org
Fri, 1 Feb 2008 11:49:27 +0100


On 01.02.2008, at 11:38, St=E9phane Corth=E9sy wrote:
> If I put '#MyAnchor' in href, I don't want the URL to be rewritten =
'http://server/App/wa/test#MyAnchor'=20
> .

Thats true. Bug in the rewriting :-)

I think the code currently assumes that you use the =20
'fragmentIdentifier' binding if you want to generate just the #fragment.

Here we probably want to change -shouldRewriteURLString: to return NO =20=

if the string starts with a #.

> If I put 'http://another.server.com' in href, WOHyperlink tries an =20
> fails to rewrite URL. It shouldn't even touch it.

Hm, in this case [NSURL -stringValueRelativeToURL:] apparently doesn't =20=

check the host properly. Not sure how that can happen, will need to =20
check this.

> Yes, there is. Href starting with '#' should not be rewritten - =20
> because if user clicks on such link, browser will reload page - , =20
> and absolute URLs having a different base than app should not be =20
> rewritten using app's base.


Yes, thats correct, we will need to fix it.

It would also be good to have a binding (or maybe a default) to =20
disable rewriting completely, though I still think its a sensible =20
default value (if rewriting *works* properly :-).

Greets,
   Helge
--=20
Helge Hess
http://www.helgehess.eu/=