+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Google Web Optimiser scripts in RadEditor

Google Web Optimiser scripts in RadEditor

6 posts, 1 answered
  1. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    13 Oct 2010
    Link to this post
    We are trying to add Google Web Optimiser scripts into the RadEditor, however part of it is being stripped out by the RadEditor. An example of the scripts we are trying to add is:

    <script>utmx_section("test")</script>
    <p>test</p>
    </noscript>

    The utmx script tag indicates the start of a section of content that can be modified using GWO, and the noscript tag indicates the end. The noscript tag is being removed by the RadEditor (presumably because it is invalid HTML - but this is the script that Google require). Is there a way of preventing it from doing this?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    13 Oct 2010
    Link to this post
    Hi Chris,

    You can remove ConvertToXhtml filter of the RadEditor and the </noscript> tag will not be removed, but this could result in invalid XHTML

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    13 Oct 2010
    Link to this post
    I just tried removing this filter but it hasn't worked, the </noscript> tag is still removed.

    If I remove all the filters it doesn't look like it's updated anything. If I type a single <p> tag then it automatically closes it - does this suggest the filters are still active? However, I have made other changes in the template which I can see taking effect.
  4. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    13 Oct 2010
    Link to this post
    After a little more investigation I have discovered that this works in IE8 but not Firefox or Google Chrome. Any ideas why this would happen?
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Oct 2010
    Link to this post
    Hi Chris,

    This is a browser behavior. You are trying to add invalid XHTML. The RadEditor is EditableIFrame. The RadEditor is trying to produce XHTML content. The RadEditor uses Rich Text Engine of the browser. Browser tags are DOM nodes and by default you cannot have closing ta without opening tags.

    You could create a simple control that uses a CotnrolDesigner and render the GWO code.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  6. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    14 Oct 2010
    Link to this post
    Ok thanks. I think I will create two controls that can be dragged onto the page to wrap one or more content items - GWO start tag and GWO end tag.
Register for webinar
6 posts, 1 answered