Convert the non-absolute urls to utf-8 if they are str.