Page 1 of 1

Special Character Inputs

PostPosted: Fri Feb 04, 2011 4:19 pm
by matthoughton

I'm doing some testing with special characters and can't get WYMEditor to properly handle them.

For instance, my string is:
Code: Select all
“test1” ‘test2’

I paste this into the WYM editor window and see exactly that string. In the HTML input, it shows exactly the same (surrounded by <p> tags).

However, when I parse the WYM text to the next script, it actually shows this:
Code: Select all
<p>“test1” ‘test2’</p>

Any ideas how I can prevent this from happening? Obviously my filters to prevent this come in too late as it is actually the editor window doing the switch.


Re: Special Character Inputs

PostPosted: Mon Feb 07, 2011 10:39 am
by matthoughton
Just thought I'd share the solution. Nothing really to do with wymeditor, but the encoding of its parent page.

Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

It would appear that the UTF character set can't cope with those characters. Change to a different encoding and filters can be incorporated to prevent them being saved.

/Job done