You can leave those out. They only provide data for the reporting action in the context menu.
Code:
|Hplayer:Moonscarlet-ServerName|hCustom Text|h
For future reference, the display portion of the link can be changed however you want to suit your needs. The only time formatting is enforced is when sending links embedded in a chat message and only a handful of link types are allowed.
Alternatively, Blizzard has a shortcut function for this.