SOLVED

Escaping the content of a Rich Text Field

Iron Contributor

Hi

I have a field which has some mark up in the text eg. <div>, <span> so I need to escape this markup.  Is there an easy way to do this in PnP PowerShell.

 

Regards

 

Nigel

1 Reply
best response confirmed by Nigel Price (Iron Contributor)
Solution

Yes, there is !

 

$value = [System.Net.WebUtility]::HtmlEncode($fieldValue.Value)

 

1 best response

Accepted Solutions
best response confirmed by Nigel Price (Iron Contributor)
Solution

Yes, there is !

 

$value = [System.Net.WebUtility]::HtmlEncode($fieldValue.Value)

 

View solution in original post