AnsweredAssumed Answered

invalid_elements

Question asked by samuel.penn on Jun 25, 2009
Latest reply on Mar 19, 2010 by samuel.penn
Hi all,

Has anyone successfully used TinyMCE parameters such as "invalid_elements" or "valid_elements" in web form elements? I have an xforms widget set up with these parameters (Alfresco 3.1 Enterprise), and I'd expect it to strip out these tags, but it's not.


           <widget xforms-type="xf:textarea"
                   appearance="abstract"
                   javascript-class-name="alfresco.xforms.RichTextEditor">
             <param name="theme_advanced_buttons1">bold,italic</param>
             <param name="height">150</param>
             <param name="mode">exact</param>
             <param name="force_p_newlines">true</param>
             <param name="apply_source_formatting">true</param>
             <param name="verify_html">true</param>
             <param name="cleanup_on_startup">true</param>
             <param name="valid_elements">p</param>
             <param name="invalid_elements">em,strong,br</param>
             <param name="verify_html">true</param>
           </widget>

The problem is that we want some limited formatting in the field, but it appears users are able to add random tags in anyway (I'm guessing via cut and paste from other sources). I'm using the above config for testing btw, hence allowing the bold/italic buttons whilst also trying to strip out em and strong tags.

Thanks,
Sam.

Outcomes