"the HTML source you entered might have been modified"

In SharePoint 2010, this is the scary message you get everytime you use the "edit HTML source" button with the Content Editor Web Part.

In which cases would the HTML source actually be modified? Has anyone experienced it?



Check out this link.

  • 1
    Thanks! Bil Simser's example in the comments is scary indeed! – Christophe Sep 1 '10 at 6:18
  • Bill's comments show the CE Web Part is actually a step backward in some terms, but a step forward in others. It goes a little bit further to prevent users from breaking sites by pasting in javascript & html willy-nilly. – James Love Aug 31 '11 at 12:37

I think the warning displays universally -- just to let you know that something may have changed whether you actually changed the content or not. It even displays when you simply click ok after opening the form.

When it actually changes the source is when you use something that it doesn't like. For example, if you put the bold tag around content, it will move the content outside of the tags and leave the tags empty. Don't know why it does this, but it likes to use the strong tag.

  • You're correct, the warning displays universally, that's what freaks me out. I'd rather have a warning only when something is actually modified. Thanks for the "bold" example. – Christophe Sep 1 '10 at 6:14

This happened again recently when trying to use the CEWP for some inline style code to hide the QuickLaunch. It changed the code so horribly that it wouldn't execute. This article helped me immensely: http://sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?List=676af157-7d96-4e15-a987-54b8a3e4d948&ID=64

  • Rob, how is this article related to this question? – Christophe Nov 24 '10 at 23:45
  • By putting your content (markup in thus case) in a text file in the site assets folder instead if in the CEWP, you are able to get around SharePoint changing it. – Rob Wilson Nov 25 '10 at 4:11
  • 1
    ok, then you might be interested in this one: blog.pathtosharepoint.com/2010/10/27/… – Christophe Nov 25 '10 at 6:38

I found this post which explain how to avoid the problem. Quickly explained use the HTML Form Web Part instead :)


  • 1
    Right, the article was actually written by...me :-) – Christophe Sep 1 '11 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.