try to backport uri handling to wicket 5