Fixed to not apply absolute prefix for relative urls starting with '#'. #3

Merged
merged 2 commits into from Apr 15, 2012

Projects

None yet

3 participants

@datakurre
Member

Currently, diazo appends absolute prefix also for relative urls starting with "#". It prevents designers from linking local anchors in theme, when absolute prefix is defined.

This patch would define a wrapper around urlparse.urljoin, which calls urljoin only when the given url doesn't start with '#'.

Test included. All tests for diazo and plone.app.theming seem to pass.

See: http://stackoverflow.com/questions/10098846/how-to-avoid-that-diazo-change-links-in-plone

@optilude

Thanks for this!

Could we call the function something other than urljoin? It's a bit confusing since that name is commonly understood from the standard library.

Martin

@datakurre
Member

Thanks. The patch should be much cleaner now. -Asko

@lrowe lrowe merged commit fe7cfe7 into plone:master Apr 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment