Finish fixing cursor API to properly manage ampersand in links
The problem with the previous fix is it didn't take into account if the ampersand in the link was before or after the cursor