No. That part works fine.
What I was doing was actually putting two ' like so <a href=''{% QueryString["URL"] |(identity)GlobalAdministrator%}''>
which seemed to be causing the problem. It now seems to work out but a strange thing is happening. After closing the macro input window, you are left with the web part modal window, clicking Apply renders the HTML correctly, but if you click OK to close the window then the HTML looks like it's been re-parsed or something and is then incorrect! If though I redo the work and click OK to close the modal window instead of Apply first everything is OK, a really strange issue.
Maybe somebody at Kentico can help out, happy to document this with screenshots.