Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

how can i force sharepoint2007 (MOSS) to interpret HTML code instead of showing it?

I have a column which calculates a yes or no (depending on other columns) within a HTML (i want to show images too). This column is not interpreted by sharepoint. HTML is shown in the column plain.

What can i do to solve this?

share|improve this question

5 Answers 5

up vote 5 down vote accepted

elcapitano, my tutorial should work:

http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/

A couple notes:

If it doesn't work, feel free to share your HTML string (calculated column output) and I'll take a look.

share|improve this answer
    
after working on the troubleshooting page, it worked! Thanks!!!! Anyway i think i have to develop a system-wide function which allows to display html. –  Anonymous Sep 27 '10 at 8:08

If you are developing a DataViewWebPart, you can force sharepoint to render the HTML as opposed to displaying the raw text by using disable-output-escaping set to yes.

share|improve this answer
    
Thanks for your idea. If it is possible, i want to solve this without coding. I tried the tutorial at blog.pathtosharepoint.com/2008/09/01/… by inserting Javascript, but it wont work. –  Anonymous Sep 24 '10 at 12:23

If you are bound to using a ListView Webpart (OOTB web part), then you can use Christophe's Text2HTML script. Elaborating on James's answer, you can also look at Marc Anderson's DVWPCalcHTMLColumn XSLT to do the heavy lifting.

share|improve this answer

We've recently released a free HTML Calculated Column; it acts just like a calculated column, but won't escape HTML:

Pentalogic's SharePoint HTML Calculated Column

Disclaimer: I work for Pentalogic; on this project actually. Oh, and I'm afraid you have to sign up for our newsletter, but that isn't a bad trade (in my unbiased opinion). :)

share|improve this answer
1  
This is very nice and works without you knowing much code - just a teensy bit. –  BGM Oct 30 '12 at 15:34
    
Thanks. If anyone needs help with the calculated column formulae, we also have a cheatsheet on our site. –  Stuart Pegg Oct 30 '12 at 18:12
    
Nice work @StuartPegg , it does the work perfectly. First I tried the JavaScript-way, it's only 2 lines with jQuery after all. But the asynchronous loading and ExpGroupRenderData (and ExpGrou...) didn't want to play along. –  eirikb Nov 12 '12 at 10:02
    
@eirikb: Yeh, the 2010 list view AJAX is a mess. It gets worse when you add paging and/or web part auto-updating. Thankfully HTMLCC didn't need these fixes, although Highlighter did. :/ –  Stuart Pegg Nov 12 '12 at 10:34

You can take a look at this blog that I wrote, that requires no jquery/javascript to get it working. It's more of tricking sharepoint to display the html properly. Super Simple!!!!

http://www.spcrew.com/blogs/Lists/Posts/Post.aspx?ID=44

share|improve this answer

Your Answer

 
discard

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