Fixed hyperlinking code to handle links terminated by quotes