Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

HTML encoding/decoding in SharePoint 2013 display template

$
0
0

I'm trying to display the contents of a blog post body in a content search web part and I can't get the post body not to display the raw html and just render the html. I believe it's because some of the characters are still encoded like ":" instead of ":".

I'm using the BodyOWSMTXT managed property which is returning html like this:

<div class="ExternalClass3CD937DC88244187815A2465A4563769"><p><img alt="sharepoint-large.jpg" src="/announcements/Lists/Photos/sharepoint-large.jpg" style="margin&#58;5px;" />&#160;</p><p>Welcome to the new SharePoint.</p></div>

Is there a function I can call inside the display template's html file to correct the encoded values or should I use another managed property because this one is formatted as text?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>