Text repeating if '&' character is present

Last post 03-22-2016, 9:12 AM by princethomas. 2 replies.
Sort Posts: Previous Next
  •  03-21-2016, 10:20 AM 82643

    Text repeating if '&' character is present

     I am using cuteEditor version 6.7 in my project which helps users to type the email body. If the user has enetered '&' instead of 'and' in the email body,  the email text repeates the text upto the '&' and appends with original message. We use the property PlainTextWithLinefeeds to read the text entered inorder to keep the formating etc in the email body.

     

    For example if I am writing below text as email body in cute editor,

     

    Hi
    Able to reproduce the issue
    This issue happens because of
    &
    The special character
    & truncates and repeat the  text
    we can write code to remove the
    & and add the hex value or something which will be converted again back..

    Thanks
    Prince
     

    But actual email body would be like as below



    Hi

    Able to reproduce the issue
    This issue happens because of &
    The special character

     

    Hi Brendan
    Able to reproduce the issue
    This issue happens because of &
    The special character & truncates and repeat the  text
    we can write code to remove the

    Hi

    Able to reproduce the issue
    This issue happens because of &
    The special character & truncates and repeat the  text
    we can write code to remove the & and add the hex value or something which will be converted again back..
    Thanks
    Prince

     

     The system repeats the message for each & found.  In the above message, you see the full message at the bottom of the email - just before that is the full message up until the last &, the message before that is the full message up until the previous & and so on.

     

    Please let me know if any fixes are avaliable for this.

     

    Thanks in advance 

  •  03-21-2016, 12:23 PM 82644 in reply to 82643

    Re: Text repeating if '&' character is present

    hi,

     

    1. try replace the editor with a textarea and test it with the same content, does it work?

     

    2.  try add the code below to the bottom of your page, does it fix the issue?

     

    1. <script type="text/javascript">        
    2. function CuteEditor_FilterHTML(editor,code)     
    3. {     
    4.     return code.split("&amp;").join("&");  
    5. }     
    6. function CuteEditor_FilterCode(editor,code)     
    7. {     
    8.      return code.split("&amp;").join("&");    
    9. }     
    10. </script>    
     

    regards,

     

    Ken 

  •  03-22-2016, 9:12 AM 82646 in reply to 82644

    Re: Text repeating if '&' character is present

     Hi Kenneth,

     

    Thanks for the reply.

    I added the above Javascript code in the page and the function is being called when the keypress event happens on cuteeditor Editor. But still the PlainTextWithLinefeeds property returns the text as above. ie It repeats the text again and again.

     

    Thanks

    Prince Thomas 

View as RSS news feed in XML