Changing link references to be proper markup