input type "text" when entering relative URLs

The input type "url" in HTML5 checks for externals URLs consisting of protocol, server name, path etc. but when internal URLs are allowed (attribute "relative" is set) the browser marks the contents as invalid which causes the field to be marked with a red frame. By setting the input type to "text" in these cases no such check is done by the browser.