SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add this a Widget in my sharepoint site. But every time someone edit the page, it mess the script. Someome knows why sharepoint is changing the script? And how to avoid it?

The script that I inserted in a Content Editor Webpart is :

<script type="text/javascript" src=""></script><script type="text/javascript">if (WIDGETBOX) WIDGETBOX.renderWidget('842855a7-ddc9-4cbf-8e46-9974f1190833');</script><noscript><a href="">Acesse o site</a></noscript>

It is like the script get duplicated, and I need to clean everything and copy the script of the widget again.

share|improve this question
up vote 3 down vote accepted

You would need to store that content in a Document Library somewhere and simply use the Content Link to point to that .js file from the Document library.

It is some kind of security measure introduced in the SharePoint 2010

share|improve this answer
Hum... I thought on something like that. So it is a security measure. – Guilherme J Santos Jun 29 '12 at 14:34
Ok. I created a html file where I inserted the script, and with the Content Editor Webpart pointed to that html file. And the problem dind't occurred anymore. Thanks. – Guilherme J Santos Jun 29 '12 at 15:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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