SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there any way to remove the html tags for text in CAML? I have made a custom alert template when sending e-mails that uses a field that looks like this:

<'GetVar Name="DisplayName#{Field}" HTMLEncode="TRUE" /'> and it produces the e-mail:

enter image description here And field body: contains all the html tags: ex <'b'> <'img src='#'> - but i only want the text. I want to remove the html tags in the body field. to make it look like this:

Body: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Curabitur vitae placerat elit. Donec fermentum placerat tortor vehicula pellentesque. Aenean sit amet fermentum velit. Nunc vitae ultrices enim. Duis posuere pellentesque lectus eu faucibus. Cras venenatis mollis ligula, id pulvinar magna elementum ut. Sed nunc est, posuere non rutrum nec, iaculis ac eros. In congue interdum erat quis tempor.

is that possible using CAML, does it have a <'GetVar Name="DisplayName#{Field}" StripHTMLAndOutputAsTextOnly="TRUE" /'>?

share|improve this question

I does not look like that it is possible:

A possible work-around could be to maintain a text only site column on the list e.g. via an event receiver hooked up to the Updated and Added events. I know it is not a great solution...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.