1 Reply Latest reply on Jul 18, 2012 8:17 AM by orotas

    Script tags in text component

    danchapmanme Level 1

      Is there a way to for script tags to be allowed when pasting html code in the text component using the source edit view. When I paste script tags, they are removed when I click OK.

        • 1. Re: Script tags in text component
          orotas Level 4

          I don't believe there is a reliable way to use the source edit to paste in javascript.

           

          Generally if I have this kind of requirement where author's need the ability paste in raw code (javascript, CSS, or markup) I will create a custom component for this that uses a text area widget rather than a rich text editor. If all I want to allow for is savascript I will have component's JSP print out the wrapping script tags, therefore preventing an author from using the component to print out unauthorized markup/styling.

           

          Obviously there is a risk to giving author's this level of control - you give them the ability violate brand and style standards and the ability to break a page (with either bad markup/styling or javascript errors).

          1 person found this helpful