fix self_url when a absolute link is provided as parameter to codes::initialize