nmw01223
nmw01223

Reputation: 1723

Sharepoint 2010 - stopping unsafe code removal

I am creating a Sharepoint 2010 site, and I am finding that after editing HTML in Sharepoint Designer, on saving some code is likely to be removed: "Content in the embedded form may be changed by the the server to remove unsafe content". This is typically where a tag references javascript, eg ... href="javascript:somefunction()" ... . The href disappears completely.

No doubt it has its reasons, but this is a closed system and I need the code there. How do I stop it?

Upvotes: 3

Views: 3297

Answers (1)

Geeky Guy
Geeky Guy

Reputation: 9399

You can't stop that. If you really want to bypass that you'll have to come up with some workaround, like using jQuery to forcefully insert your "unsafe" content in the page.

EDIT: Someone has had the same problem as you in another question here in Stack Overflow. If you're using the wiki template, your answer may as well be there:

error in sharepoint 2010 designer while saving:"Content in the embedded form may be changed by the the server to remove unsafe content. "

Upvotes: 1

Related Questions