I'm using a search plugin (SimplisticSearch) which for the most part is brilliant. I'm having an issue with stray HTML finding it's way into my code though.
I have the title as the link to the node and then a short description underneath which is pulled from the main body text of the page. In this text, I'm getting image tags and a hrefs and I would like to remove them.
I've had a look around and found (what I think) is the correct RegEx code to do this, but I'm struggling to get it working. Code below:
Combining html.raw and regex
Hi everyone,
I'm using a search plugin (SimplisticSearch) which for the most part is brilliant. I'm having an issue with stray HTML finding it's way into my code though.
I have the title as the link to the node and then a short description underneath which is pulled from the main body text of the page. In this text, I'm getting image tags and a hrefs and I would like to remove them.
I've had a look around and found (what I think) is the correct RegEx code to do this, but I'm struggling to get it working. Code below:
The (correct?) RegEx to use:
If anyone has an elegant solution that just uses razor instead, that's also fine!
Thanks,
Tom
Hi Tom
Not tested but there is/was the following helper...
Cheers Nigel
is working on a reply...