fixed crash when href/src empty

Some a link and img have no 'href' or 'src',that causes null. Obviously,url.resolve no null parameter.