Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

JavaScript in XHTML String disappears


I have a client who is using an email campaign manager which uses JavaScript to generate forms. The client needs to put these forms on various pages in the CMS.

The first time the script is put into an XHTML property and the page is published everything works. However, when you go in to edit the page again, the JavaScript is gone.

The JavaScript looks like this: 

<script language="JavaScript" type="text/javascript" charset="utf-8"src=";s=111&amp;u=1118&amp;k=d1111&amp;emb=1"></script>

The website is running on EPiServer 4.61.

Any help to get this working would be greatly appreciated. 


Mar 18, 2009 18:28

Have you tried to put add a separate longstring for the javascript and disabled all the options for it in admin mode (giving you a simple textarea)?

You'll of coursehave to add a episerver:property or some such in your templates to display the new field too.

Mar 19, 2009 13:53


I have solved this problem by putting a <span> tag and a nbsp around the script taggs.

<span style="DISPLAY: none">&nbsp;</span><script type="text/javascript">callafunction("hallo");</script> 

This will keep the script from beeing deleted by the adminGUI and display functional HTML without disturb the layout.



Mar 19, 2009 14:02

It will be removed by IE if the <script> tag is the first element in the editor.


Mar 19, 2009 14:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.