none
If gte mso 9 code added to uploaded HTM files

    Question

  • Hello,

    I have a user who is writing HTML files in notepad and then uploading the files to the Sharepoint document library.  If the file is then opened and you view the source, the following code has been added into the file...

    <!--[if gte mso 9]><xml>

    <mso:CustomDocumentProperties>

    <mso:ContentType msdt:dt="string">Document</mso:ContentType>

    <mso:Dept. msdt:dt="string">;#All Departments;#</mso:Dept.>

    </mso:CustomDocumentProperties>

    </xml><![endif]-->

     I have found that adding the <asp:Content> </asp:Content> tags work to prevent the code from being added, but is there something I can turn off in either .NET or Sharepoint to prevent this code from being added to straight HTML?

    Here is one of the original files that once uploaded gets the above code added....

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <body topmargin="1" bottommargin="1" leftmargin="1" rightmargin="1" marginheight="0" marginwidth="0">
    <h2><font face="verdana" color="#00a994" font size=2>Dates and Calendar Tool</font></h2>
    <h3><font face="verdana" color="#00a994" font size=2>Using Date Fields</font></h3>
    <p><font face="verdana" font size="1">Enter older date in the “From” field; most recent date in the “To” field. Enter dates manually or use the calendar tool.</font></h3>
    </body></html>

    Thursday, September 03, 2009 4:50 PM

Answers

  • Hi

    I’ve reproduced the tagging metadata into html file issue on MOSS 2007 SP2. I experience tagging metadata the first time I uploaded the html files.
    I think it might be the cause of this issue.

    Besides, if files added to SharePoint document library by dragging to explorer view, tagging metadata will not be added, you can check how the user adds html files to the SharePoint document library.

    Best Regards!

    • Marked as answer by Lily Wu Friday, September 11, 2009 6:08 AM
    Thursday, September 10, 2009 7:16 AM

All replies

  • Hi

    I am afraid that it is impossible to prevent the code from being added to HTML files by SharePoint.
    Actually, when a file is added to the document library, SharePoint will add some additional XML metadata into the file. Therefore, you’ll notice that size of the file uploaded to SharePoint document library reports little bigger than its original size.

    Thanks for your understanding!
    Best Regards!

    Tuesday, September 08, 2009 9:03 AM
  • This metadata has only started tagging into the html files in the past 2 months.  Prior to that, this did not happen.  If this was the behavior from the start, there wouldn't be an issue.  The only changes to the Farm have been Windows and Office patches.

    Thanks,
    Jeff
    Wednesday, September 09, 2009 2:33 PM
  • Take a look at the <asp:Content> tag.  It seems that this happens because of a case-sensitivity issue (at least that's what this post says).  Change the case (if that is that case), making sure the open/closing tags match and see if it works.  - M

    - Michael Mukalian - MCTS: MOSS 2007 Configuration - http://www.mukalian.com/blog
    Wednesday, September 09, 2009 2:43 PM
  • Michael,

    Adding the asp:Content tag is the only way I have found to prevent the tags from being added, but this goes back to my previous statement.  A couple months ago, without any asp tag added or any other help, straight HTML could be posted to a document library with no markup by Sharepoint.  If I can determine why this changed, I can explain it to my users and they will be more understanding than me hitting them with workarounds.

    Thank you,
    Jeff
    Wednesday, September 09, 2009 2:47 PM
  • Were any additional Features added/activated within that timeframe? - M

    - Michael Mukalian - MCTS: MOSS 2007 Configuration - http://www.mukalian.com/blog
    Wednesday, September 09, 2009 2:56 PM
  • Nope.  The only thing that changed was Microsoft patches.
    Wednesday, September 09, 2009 3:30 PM
  • Hi

    I’ve reproduced the tagging metadata into html file issue on MOSS 2007 SP2. I experience tagging metadata the first time I uploaded the html files.
    I think it might be the cause of this issue.

    Besides, if files added to SharePoint document library by dragging to explorer view, tagging metadata will not be added, you can check how the user adds html files to the SharePoint document library.

    Best Regards!

    • Marked as answer by Lily Wu Friday, September 11, 2009 6:08 AM
    Thursday, September 10, 2009 7:16 AM
  • Hi

    I’ve reproduced the tagging metadata into html file issue on MOSS 2007 SP2. I experience tagging metadata the first time I uploaded the html files.
    I think it might be the cause of this issue.

    Besides, if files added to SharePoint document library by dragging to explorer view, tagging metadata will not be added, you can check how the user adds html files to the SharePoint document library.

    Best Regards!


    Perfect!!!  Using drag and drop in explorer view instead of the standard upload form eliminates the XML markup.

    Thank you 1000 times!!!
    Friday, September 11, 2009 3:14 PM
  • This content is added by the "Document ID Service" Site collection feature.
    If you don't use it simply desactive the feature it will fix your issue

    Wednesday, April 30, 2014 8:48 AM