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

I had created a custom DispForm.aspx for a SharePoint list, using SharePoint designer. I included a Rich Text column type to show in DispForm.aspx. The contents of the column are showing, but somehow the html tags are also showing.

For example, if the value contains -

This is in Bold

List -

  • item 1
  • item 2

Then the text in DispForm shows -

"<strong>Bold text</strong> <br>List - <ul><li> item 1</li><li> item 2</li></ul>"

The value in the column shows properly when viewing in the list view itself.

Upon examining the DispForm.aspx in SharePoint Designer, the value of the column is coded as <xsl:value-of select="@Progress_x0020_Comments" disable-output-escaping="yes"/>

where @Progress_x0020_Comments is the value of the column.

When I inspect the final HTML rendering of the page, the contents of the column is displayed inside <td></td> tag.

Any idea how I can remove the html tags?

share|improve this question
1  
Sorry for a mistake - the "disable-output-escaping" attribute was missing (i included it in my question by mistake). I included this attribute for the column i was speaking of, and it has solved the problem! –  Deepanjan Apr 30 '13 at 16:11
    
Make sure you set this as an answer so that people who might have the same problem see your question is resolved. –  Robert Kaucher Apr 30 '13 at 16:51

1 Answer 1

My problem solved -

Upon examining the DispForm.aspx page in SharePoint Designer, as I have mentioned before, the content of the Multiple Lines Rich Text type column is displayed using the XSLT code -

<xsl:value-of select="@Progress_x0020_Comments"/>

The solution is to include the attribute "disable-output-escaping" and set it to "yes"

So the XSLT code should be -

<xsl:value-of select="@Progress_x0020_Comments" disable-output-escaping="yes"/>

share|improve this answer

Your Answer

 
discard

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.