SharePoint 2013 Article Pages showing HTML tags

SharePoint 2013 Article Pages showing HTML tags

In this post we will discuss how to solve the article pages showing html issues in SharePoint 2013. Recently while working in a Moss 2007 to SharePoint 2013 project we saw in one page, rather than coming as proper html text, it appears as html tags as shown in the fig below:

SharePoint 2013 Article Pages showing HTML tags
SharePoint 2013 Article Pages showing HTML tags

Also check out:
– SharePoint Server 2016 features deprecated or removed

– Get All Attachments From SharePoint 2013 List Item using Rest API

– Auto complete feature in SharePoint 2013 list column using SPServices in SharePoint 2013

The html tags appearing in an article page in SharePoint 2013 site which was migrated from moss 2007 to SharePoint 2013.

Solution:
To solve the issue we run the below PowerShell command.

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

$web = Get-SPWeb “http://win-pfcp2dgt8di/sites/EnjoySharePoint/”

$list = $web.Lists[“Pages”]

foreach ($page in $list.Items)

{

if ($page.Title -eq “MyTestArticlePage”)

{

[Microsoft.SharePoint.Publishing.Fields.HtmlField]$field =

[Microsoft.SharePoint.Publishing.Fields.HtmlField]$list.Fields[“Page Content”]

$field.RichText = $true

$field.RichTextMode = [Microsoft.SharePoint.SPRichTextMode]::FullHtml

$field.Update()

break;

}

}

$list.Update()

$web.dispose()


After this the page appears like below:

SharePoint 2013 Article Pages showing HTML tags
SharePoint 2013 Article Pages showing HTML tags

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →