Format links properly