HTML files have unwanted comments automatically added

Copper Contributor

Hi there

We have noticed that HTML files SharePoint has unwanted comments added in the code.

Even after we delete the following comment and save the file, it gets added back after a few minutes:

<!--[if gte mso 9]><xml>
<o:CustomDocumentProperties>
<o:_dlc_DocId msdt:dt="string">EW54V3QVCDWX-2103697601-166778</o:_dlc_DocId>
<o:_dlc_DocIdItemGuid msdt:dt="string">d49d2304-f46e-4684-84df-1df7cb938cb5</o:_dlc_DocIdItemGuid>
<o:_dlc_DocIdUrl msdt:dt="string">https://morningstaronline.sharepoint.com/sites/PPGCore/_layouts/15/DocIdRedir.aspx?ID=EW54V3QVCDWX-2..., EW54V3QVCDWX-2103697601-166778</o:_dlc_DocIdUrl>
</o:CustomDocumentProperties>
</xml><![endif]-->

Originally the commented code was below, but it changes to the one above after I try deleting and saving the file:

<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor msdt:dt="string">Ruban Bajracharya</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor>
<mso:Order msdt:dt="string">3787300.00000000</mso:Order>
<mso:_ip_UnifiedCompliancePolicyProperties msdt:dt="string"></mso:_ip_UnifiedCompliancePolicyProperties>
<mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author msdt:dt="string">Ruban Bajracharya</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author>
<mso:_ip_UnifiedCompliancePolicyUIAction msdt:dt="string"></mso:_ip_UnifiedCompliancePolicyUIAction>
<mso:ContentTypeId msdt:dt="string">0x0101000A9B5D39DB216E45A020A630DDC3CB28</mso:ContentTypeId>
<mso:_dlc_DocId msdt:dt="string">EW54V3QVCDWX-2103697601-166887</mso:_dlc_DocId>
<mso:_dlc_DocIdItemGuid msdt:dt="string">3ad54a47-d15d-4b62-a6ef-d76a8a83813a</mso:_dlc_DocIdItemGuid>
<mso:_dlc_DocIdUrl msdt:dt="string">https://morningstaronline.sharepoint.com/sites/PPGCore/_layouts/15/DocIdRedir.aspx?ID=EW54V3QVCDWX-2..., EW54V3QVCDWX-2103697601-166887</mso:_dlc_DocIdUrl>
</mso:CustomDocumentProperties>
</xml><![endif]-->

Is there a way to disable Sharepoint/OneDrive from doing this?

1 Reply

@rubanb 
The lines are added by the "property promotion" mechanism. In on-premise systems it can be disabled by changing the value of parserenabled. However, I am not aware it can be disabled for SharePoint Online. That would be useful in several use cases.

Paul | SLIM Applications (https://www.slimapplications.com/)