Object PARAM tags get mangled

Last post 03-24-2010, 9:46 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  03-24-2010, 5:15 PM 59628

    Object PARAM tags get mangled

    When I provide the following markup in the HTML pane of the Cute Editor:
     
    1. <object>  
    2. <param name="x" value="y"></param>  
    3. </object>  
     
    and click Save, the resulting HTML is:
     
    1. <object>  
    2. <param name="x" value="y" /></param>  
    3. </object>   
     
    Note the mangled closing of the param tag, with the errant "/>" at the end of it.
     
    This is a simiplifed example. A real world example of code that this occurs with is the embed markup that YouTube provides. Here's an example:
    1. <object width="640" height="385">  
    2. <param name="movie" value=" name="allowFullScreen" value="true"></param>  
    3. <param name="allowscriptaccess" value="always"></param>  
    4. <embed src="http://www.youtube.com/v/EAtBki0PsC0&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed>  
    5. </object>  
    And Cute Editor's result:
    1. <object width="640" height="385">  
    2. <param name="movie" value=" name="allowFullScreen" value="true/></param>  
    3. <param name="allowscriptaccess" value="always" /></param>  
    4. <embed src="http://www.youtube.com/v/EAtBki0PsC0&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>   
     
     
    I have done this on IE8, Vista SP2 32 bit, and have confirmed this behavior on the demo page located at http://cutesoft.net/example/general.aspx.
     
    Can anyone provide a fix for this? Any information would be appreicated. Thanks in advance.
  •  03-24-2010, 9:46 PM 59635 in reply to 59628

    Re: Object PARAM tags get mangled

    Hi moskie,
     
    It is not the best way, but for now you can add the code below in the page to avoid this problem.
     
    1. <script>   
    2. function CuteEditor_FilterHTML(editor,code)   
    3. {   
    4.  return code.replace(/(\<\/param\>)/i, "");   
    5. }   
    6. function CuteEditor_FilterCode(editor,code)   
    7. {   
    8.  return code.replace(/(\<\/param\>)/i, "");   
    9. }   
    10.   
    11. </script>  

    Regards,
     
    Ken
View as RSS news feed in XML