Switching between HTML and Normal Tab would corrupt nested quoted text inside html tags

Last post 03-02-2012, 11:40 PM by Anonymous. 2 replies.
Sort Posts: Previous Next
  •  02-28-2012, 12:05 PM 73241

    Switching between HTML and Normal Tab would corrupt nested quoted text inside html tags

    Hello,
     
    I have the following bug: (Can be replicated using any of the examples/demos of the editor);
     
    1. Type in the following:  "<a href="javascript:alert('text');">test</a>" into HTML tab
    2. Switch to Normal Tab
    3. Switch back to HTML tab
    4. Editor would change the typed in URL into the following:  <a href="javascript:alert(" text');"text');">test</a>
     
     There problem seems to be with nested single/double quotes within HTML/Javascript code.
     
    Looking forward to the solution or a work around.
    Thank you 
     
     
  •  02-28-2012, 2:00 PM 73244 in reply to 73241

    Re: Switching between HTML and Normal Tab would corrupt nested quoted text inside html tags

    Hi slavik, 

     
    We can reproduce this. I've logged it. And will report to our development team. Once issue is resolved, I will keep you posted.
     
    Regards,
     
    Ken 
  •  03-02-2012, 11:40 PM 73299 in reply to 73241

    Re: Switching between HTML and Normal Tab would corrupt nested quoted text inside html tags

    I found a problem inside CuteEditor\Scripts\
     IE_Implementation\CuteEditorImplementation.js
    Gecko_Implementation\CuteEditorImplementation.js
     
    inside a call to "function Ox970(Ox2d)"
    To fix replace this line: (inside Gecko_implementation)
    Ox2d = Ox2d.replace(/(<a\s[^>]*href=)(["'])([^"'>]*)["']([^>]*)(\shref_cetemp=)["']([^"'>]*)["']/gi, OxO40c2[1084]);
     
    with those two lines instead:
    Ox2d = Ox2d.replace(/(<a\s[^>]*href=)(["])([^">]*)["]([^>]*)(\shref_cetemp=)["]([^">]*)["]/gi, OxO40c2[1084]);
    Ox2d = Ox2d.replace(/(<a\s[^>]*href=)(['])([^'>]*)[']([^>]*)(\shref_cetemp=)[']([^'>]*)[']/gi, OxO40c2[1084]);
     
    for IE_Implementation 
    use  OxO4c7c[1034] as second replace parameter instead of OxO40c2[1084] 
     
    The problem is that RegEx pattern chokes when trying to parse out "href_cetemp=..." temporary URL out of text with nested alternative quotes.
     
    Disclaimer: Use at your own risk - I have no affiliation with Cute team.
     
     
View as RSS news feed in XML