How can I stop SharePoint from appending <mso:CustomDocumentProperties> to my output
- by tath.am
I'm trying to hack together an extra feature on top of a POC (smoke and mirrors demo). The POC is on SPS 2007 and I need to integrate with another system.
To facilitate part of this, I need to provide a JSONP endpoint.
I want this URL:
http://sharepoint:2024/Pages/SomeExternalSystem/Payload.aspx?callback=abc
To return this:
abc({ sampleField1: "sampleData1", sampleField2: 234.56 });
It's all smoke and mirrors anyway, so I uploaded this file to SharePoint:
<%@ Page ContentType="text/javascript" Language="C#" %>
<%= Request.QueryString["callback"] %>({
sampleField1: "sampleData1",
sampleField2: 234.56
});
(And added a page parser rule to allow it to compile the code blocks.)
No matter what I seem to do, SharePoint emits this instead:
abc({
sampleField1: "sampleData1",
sampleField2: 234.56
});
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:PublishingContactPicture msdt:dt="string"></mso:PublishingContactPicture>
<mso:PublishingRollupImage msdt:dt="string"></mso:PublishingRollupImage>
<mso:Audience msdt:dt="string"></mso:Audience>
<mso:PublishingContactName msdt:dt="string"></mso:PublishingContactName>
<mso:ContentType msdt:dt="string">Page</mso:ContentType>
<mso:Comments msdt:dt="string"></mso:Comments>
<mso:PublishingContactEmail msdt:dt="string"></mso:PublishingContactEmail>
</mso:CustomDocumentProperties>
</xml><![endif]-->
</head>
It's proving hard to Google for.