For mu version > 1.3.2. you need to define a filtering function and store its name in mu4e-contact-process-function, e.g. like in this example
(defun my-mu4e-contact-filter-function (addr)
I'm not sure at what point your text comes in, but since this is org-capture, you can use org-capture-prepare-finalize-hook to do postprocessing like this:
(add-hook 'org-capture-prepare-finalize-hook (lambda () (unsafelinks nil)))
Note that this does the postprocessing globally, so consider using the fourth argument of add-hook to do it locally or write a ...