HTML files have unwanted comments automatically added

%3CLINGO-SUB%20id%3D%22lingo-sub-1622003%22%20slang%3D%22en-US%22%3EHTML%20files%20have%20unwanted%20comments%20automatically%20added%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1622003%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%3C%2FP%3E%3CP%3EWe%20have%20noticed%20that%20HTML%20files%20SharePoint%26nbsp%3Bhas%20unwanted%20comments%20added%20in%20the%20code.%3C%2FP%3E%3CP%3EEven%20after%20we%20delete%20the%20following%20comment%20and%20save%20the%20file%2C%20it%20gets%20added%20back%20after%20a%20few%20minutes%3A%3C%2FP%3E%3CP%3E%3C!--%3CSPAN%20class%3D%22error%22%3E%5Bif%20gte%20mso%209%5D%3C%2FSPAN%3E%3E%3Cxml%3E%3CBR%20%2F%3E%3Co%3ACustomDocumentProperties%3E%3CBR%20%2F%3E%3Co%3A_dlc_DocId%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3EEW54V3QVCDWX-2103697601-166778%3C%2Fo%3A_dlc_DocId%3E%3CBR%20%2F%3E%3Co%3A_dlc_DocIdItemGuid%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3Ed49d2304-f46e-4684-84df-1df7cb938cb5%3C%2Fo%3A_dlc_DocIdItemGuid%3E%3CBR%20%2F%3E%3Co%3A_dlc_DocIdUrl%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E%3CA%20title%3D%22Follow%20link%22%20href%3D%22https%3A%2F%2Fmorningstaronline.sharepoint.com%2Fsites%2FPPGCore%2F_layouts%2F15%2FDocIdRedir.aspx%3FID%3DEW54V3QVCDWX-2103697601-166778%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmorningstaronline.sharepoint.com%2Fsites%2FPPGCore%2F_layouts%2F15%2FDocIdRedir.aspx%3FID%3DEW54V3QVCDWX-2103697601-166778%3C%2FA%3E%2C%20EW54V3QVCDWX-2103697601-166778%3C%2Fo%3A_dlc_DocIdUrl%3E%3CBR%20%2F%3E%3C%2Fo%3ACustomDocumentProperties%3E%3CBR%20%2F%3E%3C%2Fxml%3E%3C!%3CSPAN%20class%3D%22error%22%3E%5Bendif%5D%3C%2FSPAN%3E--%3E%3C%2FP%3E%3CP%3EOriginally%20the%20commented%20code%20was%20below%2C%20but%20it%20changes%20to%20the%20one%20above%20after%20I%20try%20deleting%20and%20saving%20the%20file%3A%3C%2FP%3E%3CP%3E%3C!--%3CSPAN%20class%3D%22error%22%3E%5Bif%20gte%20mso%209%5D%3C%2FSPAN%3E%3E%3Cxml%3E%3CBR%20%2F%3E%3Cmso%3ACustomDocumentProperties%3E%3CBR%20%2F%3E%3Cmso%3Adisplay_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3ERuban%20Bajracharya%3C%2Fmso%3Adisplay_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor%3E%3CBR%20%2F%3E%3Cmso%3AOrder%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E3787300.00000000%3C%2Fmso%3AOrder%3E%3CBR%20%2F%3E%3Cmso%3A_ip_UnifiedCompliancePolicyProperties%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E%3C%2Fmso%3A_ip_UnifiedCompliancePolicyProperties%3E%3CBR%20%2F%3E%3Cmso%3Adisplay_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3ERuban%20Bajracharya%3C%2Fmso%3Adisplay_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author%3E%3CBR%20%2F%3E%3Cmso%3A_ip_UnifiedCompliancePolicyUIAction%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E%3C%2Fmso%3A_ip_UnifiedCompliancePolicyUIAction%3E%3CBR%20%2F%3E%3Cmso%3AContentTypeId%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E0x0101000A9B5D39DB216E45A020A630DDC3CB28%3C%2Fmso%3AContentTypeId%3E%3CBR%20%2F%3E%3Cmso%3A_dlc_DocId%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3EEW54V3QVCDWX-2103697601-166887%3C%2Fmso%3A_dlc_DocId%3E%3CBR%20%2F%3E%3Cmso%3A_dlc_DocIdItemGuid%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E3ad54a47-d15d-4b62-a6ef-d76a8a83813a%3C%2Fmso%3A_dlc_DocIdItemGuid%3E%3CBR%20%2F%3E%3Cmso%3A_dlc_DocIdUrl%20msdt%3Adt%3D%26quot%3Bstring%26quot%3B%3E%3CA%20title%3D%22Follow%20link%22%20href%3D%22https%3A%2F%2Fmorningstaronline.sharepoint.com%2Fsites%2FPPGCore%2F_layouts%2F15%2FDocIdRedir.aspx%3FID%3DEW54V3QVCDWX-2103697601-166887%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmorningstaronline.sharepoint.com%2Fsites%2FPPGCore%2F_layouts%2F15%2FDocIdRedir.aspx%3FID%3DEW54V3QVCDWX-2103697601-166887%3C%2FA%3E%2C%20EW54V3QVCDWX-2103697601-166887%3C%2Fmso%3A_dlc_DocIdUrl%3E%3CBR%20%2F%3E%3C%2Fmso%3ACustomDocumentProperties%3E%3CBR%20%2F%3E%3C%2Fxml%3E%3C!%3CSPAN%20class%3D%22error%22%3E%5Bendif%5D%3C%2FSPAN%3E--%3E%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20disable%20Sharepoint%2FOneDrive%20from%20doing%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1622497%22%20slang%3D%22en-US%22%3ERe%3A%20HTML%20files%20have%20unwanted%20comments%20automatically%20added%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1622497%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F776421%22%20target%3D%22_blank%22%3E%40rubanb%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EThe%20lines%20are%20added%20by%20the%20%22property%20promotion%22%20mechanism.%20In%20on-premise%20systems%20it%20can%20be%20disabled%20by%20changing%20the%20value%20of%26nbsp%3B%3CSPAN%3Eparserenabled.%20However%2C%20I%20am%20not%20aware%20it%20can%20be%20disabled%20for%20SharePoint%20Online.%20That%20would%20be%20useful%20in%20several%20use%20cases.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EPaul%20%7C%20SLIM%20Applications%20(%3CA%20href%3D%22https%3A%2F%2Fwww.slimapplications.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.slimapplications.com%2F%3C%2FA%3E)%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Visitor

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
Highlighted

@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/)