WordPress.org

Ready to get started?Download WordPress

Forums

No-break space is removed by the editor (10 posts)

  1. Wabsnasm
    Member
    Posted 5 years ago #

    I'm trying to enter a phone number and another number, both of which should have non-breaking spaces.

    I don't want my phone number looking like this:
    +44 (0) 700 000
    000

    So I'm trying to add   between each group of numbers. When I use the 'Insert custom character' tool in the editor to insert a no-break space, it simply inserts a normal space. When I enter the   entity in the HTML tab manually, it is converted to a normal space.

    Is there any way I can enter this entity from the editor, and is this a known bug?

  2. Saurus
    Member
    Posted 5 years ago #

    Link to your blog?
    Is this going in a sidebar or something? If so, your sidebar has to be set wide enough to accomodate your data or it will break no matter what characters you add.

  3. Wabsnasm
    Member
    Posted 5 years ago #

    My site's not live yet. It's not in a sidebar, but the body of a post, and the width is fine, that's not the problem. I just need it to render   as output when I enter it as input, instead of changing it.

  4. Wabsnasm
    Member
    Posted 5 years ago #

    I'm having trouble believing that no-one else has found this issue before. Is it something I'm doing that is preventing a non-breaking space from being output?

    Or perhaps this post's title is not relevant to its content, so people are overlooking it.

    It's a general issue: has anyne out there using version 2.6.3 input a no-break space in a post, and found that it's preserved in the output of the post?

  5. acekin
    Member
    Posted 5 years ago #

    I suffer from the same problem. In a table I insert no-break spaces to preserve the table cells. Otherwise, WP editor collapses them to nothing, preventing adding content later on. Another side effect is that if I insert a blank row with no-break spaces in the cells, I see the blank row. The next time I edit the entry, WP editor strips all   and I end up losing the blank row. Annoying. There has to be a way of making the editor aware of this character, a legitimate HTML entity. I also would like the WP editor to leave the table cells and rows alone even if there is no content.

  6. aensidhe
    Member
    Posted 5 years ago #

    I have same problem at wordpress 2.7. WYSYWIG editor removes   from text, but if edit post in Plain HTML mode they are saved normal.

    Link to my blog is in my profile.

  7. Saurus
    Member
    Posted 5 years ago #

    This situation has been commented on ad nauseum. You should NOT use the code and visual editors for the same post. In fact - you should choose one style and disable the other, because switching WILL break any code you enter, as will pasting text from a non-plain text editor like Word or others which add extraneous characters to your text.

  8. Wabsnasm
    Member
    Posted 5 years ago #

    Saurus, that is not the problem I'm encountering. What's happening is that if I enter the non-breaking space from the 'special characters' tool, it's rendered as a normal space.

    So far I have found no solution that allows me to enter a non-breaking space in a post. I find it incredible that no-one has ever entered a non-breaking space in any WordPress post, which is why I'm here, hoping that I've missed something really simple and obvious.

  9. Benjamin L.
    Member
    Posted 5 years ago #

    Hello, nothing obvious for myself too... I have the same problem.

    I partially resolved it by writing a quick plugin to prevent TinyMCE to strip   entity. So when activated it allows to enter by hand the   entity in the HTML view. (Tested on 2.6.3 and 2.7).

    However under the 2.7, I still can't use the special character (or the button from the WP Super Edit plugin).

    http://benjaminlupu.net/misc/2009-01-29/tiny-mce-configuration-plugin.zip

  10. Benjamin L.
    Member
    Posted 5 years ago #

    @all - Hi again

    I think I have a new clue.

    http://sourceforge.net/tracker/index.php?func=detail&aid=1628509&group_id=103281&atid=635682

    It appears that TinyMCE has a bug when inserting nbsp entity (from charmap or using the nonbreaking plugin).

    However the bug affects only FF. I have tested the insert from charmap under IE7 and it works fine (WP 2.7).

    So I guess we have to wait that somebody fixes the thing.

    Please note that even the TinyMCE demo on http://tinymce.moxiecode.com/ has the bug (works with IE and not working with FF).

Topic Closed

This topic has been closed to new replies.

About this Topic