Jump to content

Random  characters appearing from TinyMCE...


Iain
 Share

Recommended Posts

Hi again,

We've got a TinyMCE editor as our main content field. When we enter information that's been sent to us we keep getting the  character appearing. It seems to be when there are two spaces next to each other and TinyMCE tries to render them as " " - I've included some of the outputted HTML below...

Any reasons why this might be happening? When we edit the HTML and remove the extra spaces it displays perfectly...

Above average and continue to improve. 
Students of all abilities make good progress.</li>
<li>The school has good teachers who work hard and set a good example. 
There are many examples of outstanding and good learning.</li>
Link to comment
Share on other sites

What is the encoding of the document you are copying the text from?

After pasting in the text, do you see these characters in TinyMCE (PW admin) or just on your website?

If you see them in TinyMCE, do you only see them after saving the page, or do you see them immediately after pasting the text into the document?

Based on your answers to the above, I think we'll be able to figure it out.

Also, just to double check, look in your browser what character set it's using. In Chrome, it would be View > Encoding. In Firefox, View > Character Encoding. It should say "UTF-8"–let me know if it doesn't.

Link to comment
Share on other sites

Hi Ryan,

We're getting stuff in Word, but copying it into Notepad++ (which uses basic UTF-8 encoding and strips out all of Word's crappiness), then copying and pasting into the TinyMCE window.

The characters don't show up in the editor at all, not in the HTML editor window nor the WYSIWYG, just when they're rendered onto the website.

This comes up in both IE and Firefox which are using UTF-8 as well..

In fact I've just realised that you can type a word straight into the editor, put in 2 spaces before the next word and you get the same thing happening, so it's not a copy/paste problem I assume.

Link to comment
Share on other sites

So far I can't duplicate this. Though a search in Google reveals that others have seen this with TinyMCE (in other CMSs), though not an obvious answer. Can you forward a URL to me that has these characters showing up in it? Post in here, or PM it to me if confidential. I want to have a look at what headers the server sends before the page get rendered.

Link to comment
Share on other sites

Got your PM– The encoding on that page is ISO-8859-1. Likely that's the default on your server in Apache, and since you aren't overriding it, it's taking control. You need to add this right after your opening <head> tag in your site's main/header template:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...