Add a parameter to validate_url() to control if absolute urls are guessed

Someone have a look at it if the code duplication can be avoided.