Still Life

A Series of Mental Snapshots

Bugs In the Wild: WYSIWYG in WordPress Edition

Posted by Steve on April 22, 2009

I ran into this issue when creating my post for importing/exporting individual tables in MySQL. The issue resolves around the principal of WYSIWYG (What you see is what you get).

For one of the MySQL commands it was necessary to have two dashes (or minuses) next to each other, as can be seen in my the post mentioned above.  In the WordPress text editor displayed the two dashes properly in both the visual and HTML views, but after I had published the post, the two dashes where displayed (and when copied acted) as a single dash! For example the character in the quotation is seen as two dashes in the editor “–” but as can be clearly seen it is displayed as a single dash.

I tried for a while to resolve the issue, but I ended up just spacing out the dashes, like so “- -“, so that it could be seen that there were actually two dashes.

I feel this falls under a WYSIWYG type issue as in the text editor I was able to see the two dashes properly, but then when the post was published the same thing was not displayed therefore what I was seeing n the editor was not what I got in the post.

–Steve

Advertisements

4 Responses to “Bugs In the Wild: WYSIWYG in WordPress Edition”

  1. I wonder if the problem happens for me (he said, typing two hyphens): —

    I wonder what happens when you use two instances of −?

    −−

    I wonder what happens when you use two instances of –?

    And I wonder if the problem is in the WordPress editor, but not in this input field.

    —Michael B.

  2. So there’s one answer, Steve: use −

    I’m not convinced it’s a bug in WordPress, but I don’t know enough about character sets to be sure.

    Weirdly, as I type, I can see my comment post above in Firefox…but in Internet Exploder, I can’t.

    —Michael B.

  3. Ah. The non-displaying text is because my comments are awaiting moderation. The Firefox session ID tells the page it’s okay to show and tell that session about it, but this one doesn’t see it.

    —Michael B.

  4. Steve said

    Michael,

    You clearly did a little more testing than I did for this one = ).

    I think I did not investigate very much because I did not exactly know where to start. For me personally it has been a long time since I have needed to use any direct ascii (or similar codes) because in the web development I do, everything is displayed and spaced properly by using CSS.

    Once I saw your post about the &minus, it got me to thinking, and I went a viewed the page source and low and behold I found the following section of code in the html:

    two dashes in the editor &#8220&#8211&#8221 (but with ; after each one)

    Based on this I now know the &#8211 refers to a dash, so in the future the &#8211 can also be used for dashes. The interesting thing hear is that I (and you Michael) definitely typed two dashes, so somewhere between the text editor and the post it gets interpreted as a single dash. I would also agree that I do not think it is an issue with WordPress but perhaps with the editor they use. To quickly test this out I sent myself a comment from my website with two dashes in the text editor and I received them in my e-mail properly, so it is not a generic problem across all text editors.

    Thanks for the first solution and the starting point to spur my further investigation!

    –Steve

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: