It’s not easy to fix that and to keep the apparmor profile secure. Technical background:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951331#23
For better security, I recommend a manual process.
- Do not click links in HexChat (or any other application)
- copy/paste links into a text file to see what you actually copied
- and then if that looks good, copy the link into a browser.