Content Editor Web part Html Not rendered Issue Solved

Problem: I am deploying the layout pages using the module. Inside the zones I am adding the default web parts. The problem is one of my content editor web part contains the CSS and HTML tags. When I am deploying it the web part comes properly but html not rendered properly.
 I have tried the following method to solve the problem.
1.       I have placed the html in the web part then export the content editor web part and place inside the Element.xml file. The problem is still there content not rendered property.  (Not Worked)
2.       Place the html content inside the <![CDATA[]].I am getting the red swing line. It shows that the xml not well formatted.  Please see the bellow image.  (Not Worked)
 
3.       Encode the Html then placed it inside the content. Now the html rendered inside the content editor web part. I used the Html Encode tool and encode the html and place it inside the content tag. (Worked)

Comments

Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

Send Email using SharePoint Rest API

Query suggestions in SP 2013 Using Rest API (/_api/search/suggest)