safe_referrer() and internal_link()

preventing redirects to an outside referrer