Support » Fixing WordPress » Quotation marks in Tiny MCE

  • When I insert this piece of code into Tiny MCE:

    <div id="info"><abbr title="Blabla: blablabla.">Bla</abbr></div>

    Everything is OK.
    But when I try to insert this:

    <div id="info"><abbr title="<strong>Blabla:</strong> blablabla.">Bla</abbr></div>

    I get this:

    <div id="info"><abbr title="<strong>Blabla:</strong> blablabla.»>Bla</abbr></div></blockquote>

    How can I get rid of » and have simple ” ?

    P.S. In fact I get ampersand#187 but the editor in this page changed it into &raquo.

    P.S.2 It’s strange that the same editor in this page, by its own accord, insert another blockquote tag in the end of this post… It’s a very unruly editor. 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
  • Timothy Jacobs


    HTML does not allow you to style title attributes. It seems like the wordpress editor is trying to make sense of your input, and well it obviously didn’t work. What were you trying to achieve with the <strong> tags.

    Hello, Timothy! I am trying to implement mobile friendly tooltips (css+jquery). Just look here and you’ll see that HTML does allow style title attributes (italics used in the text of a tooltip as you can see on the demo page). The solution by Osvaldas Valutis works for me nicely on a usual html site but I can’t use it in WP because of TinyMCE’s pranks.

    I need some rather lengthy tooltips on a few of my pages (additional information for specialists) and I would like them to be styled like this: Volume: blabla… Recommended for: blabla etc.

    Hooray! RawHtml plugin did the trick!

    Timothy Jacobs


    Hey Anapest, glad to see you found a solution, but what I am trying to say is that putting styles in the title attribute is not what TinyMCE would expect as valid HTML because on its own the browser will just see it as “Blabla: blablabla.” ie, if you disable javascript that will be what you will see when you hover over to. The jquery plugin is just taking the styles that are present under that attribute, and if you look at the code you will see that it is then just creating a div element with the html from the title attribute and positioning it relative to where the link appears, and then removing the tool tip. So TinyMCE tries to convert those characters into there html equivalents, because it doesn’t know about the jQuery plugin and knows that the html will appear as text.

    Thank you for this explanation, Timothy. Surely you have a point. By the way, do you think it would be better to avoid any jquery things on websites because some users may have javascript disabled?

    Timothy Jacobs


    God no. JQuery is a fantastic design tool, but it should only be used as a design tool. i.e. you should make sure that if javascript is disabled that your site still functions properly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Quotation marks in Tiny MCE’ is closed to new replies.