This is a migrated thread and some comments may be shown as answers.

Part of the eMail Message created in Editor control was replaced with Junk Characters

10 Answers 112 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 08 Jan 2009, 04:47 PM
We developed an .NET email application using the Telerik editor to communicate with our external clients. Today we sent an email to some recipients and found most clients received the email with correct content. But a few clients found part of the content of their emails was replaced with junk characters.

Here is what we did in the email. We created the email in MS Word and pasted the content into the Editor control. We checked the content sent out and verified thel content was sent to all recipients with the right information.

We did some investigation and found that when the email was received by the email client application (MS Exchange Server) of our clients, the content in a line will be replaced by the character b from the “ character (copy/paste i MS word to Telerik Editor) to the end of the line. That means the character from MS Word caused the problem.

Did anyone have this problem before? If so, how to get it fixed. Thanks.



Chris

10 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 08 Jan 2009, 09:15 PM
Hi Chris,

Just curious, what version of Word are you pasting from?  I noticed some odd behavior at one point coming from people pasting from Outlook 2007 (which resulted in us telling users NOT to paste from Outlook, as the MS markup was rediculous), just curious if your problem is with the 2007 suite as well.
0
Chris
Top achievements
Rank 1
answered on 08 Jan 2009, 09:32 PM
I copied from MS Word 2003. For Outlook, we use Outlook 2003.
0
Rumen
Telerik team
answered on 12 Jan 2009, 08:13 AM
Hi guys,

The problem is that the single quotes and some other symbols which MS Word uses are special Unicode symbols that are not properly saved. If you use the editor for entering quote marks and not pasting them from word, the characters will be always entered/displayed correctly.

Our suggestion for your scenario is to check the produced HTML content  for quotation marks  “” and to replace them using the RadEditor1.Content.Replace( “”, "'"); method before saving the editor content to the database.

Greetings,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 14 Jan 2009, 02:53 PM
Rumen,

Thank you for your last update.

When we sent out the email, most of the users received the right email content OK, and just a few of them received it with some content replaced by junk characters. My question is why this happened. Is it because our clients' email client applications such as MS Exchange server, the spam setting for the mail server, email email client language setting, ....?

Our application is heavily used by external users also. A lot of them create emails in MS Word and then copy and paste into Rad Edit control in our application. We will have to get this problem fixed.
You mentioned that some of symbols copies from MS Word can cause that problem. Do you know besides  "", what other symbols or characters will cause the same problem? Thanks.



Chris
0
Rumen
Telerik team
answered on 19 Jan 2009, 10:17 AM
Hello Chris,

The problem is that some users receive the e-mail content in ASCII format, but not in Unicode.
Since MS Word produces Unicode content , the special Word quotes (quotations marks) are displayed incorrectly as junk characters due to its Unicode encoding. The Word content is pasted in RadEditor with Unicode formatting and send to the clients with the same formatting. We cannot do anything to change it, because the content is pasted with Unicode encoding.

You can try to write a content filter that will replace the most commonly used non-ASCII symbols as the Word quotation marks.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
BTRDEV-01
Top achievements
Rank 1
answered on 19 May 2009, 02:07 PM
Hello Telerik Team,

I have  a problem similar to the above but not exactly the same. In our case, users are entering blog posts directly, without copying in from Word. Whats happening is that the editor seems to be adding characters to the text as the example below shows:

The user typed:
I'm looking forward to our second episode

But ended up with:
$0I'm looking forward to our second episode

In another sentence the user typed:
We are also going to be reviewing a pair of Midland GMRS radios that are used in the field. Please join us on

But ended up with:
We are also going to be reviewing a pair of Mildand GMRS radios that are used in the field.$0$0$0$0$0Please join us on


Your help will be appreciated!

BT

0
Rumen
Telerik team
answered on 19 May 2009, 02:26 PM
Hi,

The problem is a change (or rather, a bug) that exists in the latest WebKit release which is currently used by Safari. The problem was first manifested in the original Chrome release several months ago - because Chrome uses WebKit as well - and it started off with using the latest version right then.

As Chrome was released, we provided a fix/workaround for this problem. Hence, the best option for you would be to upgrade to a latest Telerik.Web.UI version (Q1 SP1 2009).

If for some reason this is not an option, then you will need to disable the ConvertToXhtml editor content filter. Content filters are discussed in the following online demo:
http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

Sincerely,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
BTRDEV-01
Top achievements
Rank 1
answered on 19 May 2009, 02:44 PM
Thanks for your reply Rumen.

At the moment, we will try to make do with disabling the XHTML content filter. I read the article you pointed me to and it was very informative. I am wondering though, if there is a way for me to set the default filters and then just disable that one filter. From what I see, it looks like if I want to disbale the one, I would need to explicitly enable all the others.

Also, this is indeed happening a lot in Chrome. My users pointed out, that it happens periodically in ie8 as well. What might be the cause in ie8 (or does ie8 have some webkit code in it as well)?


Many Thanks,
BT
0
BTRDEV-01
Top achievements
Rank 1
answered on 21 May 2009, 03:10 PM
For the benefit of anyone else looking how to accomplish this, this is how I ended up doing it.

The ContentFilter enum is a flagAttribute enum, so it gets manipulated with bitwise operators. I wanted to keep the default and just turn off the one filter, so here is how to do that.

        TextEditor1.ContentFilters = Telerik.Web.UI.EditorFilters.DefaultFilters;
        TextEditor1.ContentFilters &= ~Telerik.Web.UI.EditorFilters.ConvertToXhtml;

This sets the default filters to ON, and then just bitwise ANDs the negation of the ConvertToXhtml mask, which turns OFF that one bit.



Thanks,
BT
0
Rumen
Telerik team
answered on 22 May 2009, 07:12 AM
Hello BT,

I just want to add that another way to disable a built-in filter is to use the DisableFilter server method of RadEditor, e.g.

C#

RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml); 

VB.NET
RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml)

Sincerely,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Chris
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Rumen
Telerik team
BTRDEV-01
Top achievements
Rank 1
Share this question
or