2
Vote

Link Field for url with anchor

description

Url with anchor (/page#anchor) in Link Field is not valid

comments

BertrandLeRoy wrote Nov 25, 2013 at 8:09 AM

This looks like something that would be just fine as a module. Why does this need to be in core?

AimOrchard wrote Nov 25, 2013 at 8:32 AM

What are you with the core, if it cannot handle core features?

A link that you can click can contain an anchor, why should you disallow this?

agriffard wrote Nov 25, 2013 at 11:24 AM

The LinkFieldDriver tests if the Url is valid using the method Uri.IsWellFormedUriString()
As you noticed, it seems that it returns an error with '/page#anchor'.

Can you use 'http://www.yoursiteurl/page/#anchor', which is valid ?

neTp9c wrote Nov 25, 2013 at 4:56 PM

http://domain.com/page#anchor is valid but /page#anchor is not valid. It is not right.

Disallow anchor same disallow slash as end url.