You are here:  » How to remove "mailto" link from description


How to remove "mailto" link from description

Submitted by Retro135 on Mon, 2017-01-16 18:43 in

I want to remove a "mailto" link from a merchant description. It includes a subject with a few varying words at the end. What kind of filter / regex do I need to use for this?

Submitted by support on Mon, 2017-01-16 18:50

Hi,

A Strip HTML filter would remove the mailto <a> tag but of course all other HTML in the description. If you specifically want to maintain feed HTML but just remove the mailto link, let me know and it would be possible to come up with something more specific with a little regexp magic...

In general, I don't recommend allowing HTML in feed descriptions as I have come across so many cases where descriptions contain deep links that are _not_ your Affiliate URL..!

Cheers,
David.
--
PriceTapestry.com

Submitted by tobyhage on Sun, 2017-06-11 10:26

Hello,

I like to preserve the html in the description field. Is there a regular expression to remove the (deep)links.

Thank you!

Submitted by support on Sun, 2017-06-11 10:49

Hi Toby,

First add the Search and Replace RegExp filter from this comment. With that in place, use as either a global or per-feed filter as required, against the description field, configured as follows:

Search:

/<a.*>.*<\/a>/U

Replace:

$1

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by tobyhage on Sun, 2017-06-11 20:39

thank you!!