Support » Plugin: MailPoet - emails and newsletters in WordPress » Non-breaking space HTML code “nbsp” does not work

  • Hello, I often like to use the   HTML code to get a non-breaking space. For example, to keep a number and the unit together and prevent a line break like “…a size of 100
    MB is…”

    I have noticed that I can enter the   code when using the source editor. It is saved and it does work on the edit screen, but in the preview or final mail all non-breaking spaces are replaced with normal spaces.

    Can we use non-breaking spaces?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Elvira K. a11n


    Hi there @w-sky,

    Thanks for reaching out!

    Can you please send me the block of HTML that you use and a screenshot of what this text looks like in the preview?

    Looking forward to hearing back from you!

    Plugin Support kellymetal a11n


    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    For @w-sky – in case it’s still an issue:

    Here are two different ways you can get them to stick:

    1. Instead of inserting   in the HTML source editor, insert   there.

    2. Instead of inserting   in the HTML source editor, insert it in the regular editor.

    Either way, the outcomes will be the same: in the regular editor (as in the raw HTML source in the generated preview or email), you’ll see the string ‘ ‘ – but in the Preview window, you’ll just see beautiful, non-breaking-spaced text.

    Cheers 😀

    Well, for my approach #1, I guess I need to spell out the string you should enter:

    an ampersand, followed by amp;, followed (immediately) by nbsp;.

    • This reply was modified 8 months, 3 weeks ago by andy.carver.

    AND, let me repair the last sentence’s appearance, by saying that you’ll see the text-string nbsp; in both the regular MP editor and (thankfully) in the raw, generated HTML.

    Thread Starter w-sky


    Hello @andycarver

    Sorry I am not sure what you mean. If I enter as I understand: “ ” to the source editor, it will be shown as   in the normal editor, but also in the preview and in sent email I will see   in the text.

    If I enter the same string into the text editor, it will be shown unchanged. Neither way it actually renders a non-breaking space at that point.

    Thread Starter w-sky


    Hello @treibalen

    Sorry I missed your reply.

    Here are 3 screenshots:

    You see how I entered   into the source, how it is shown in MailPoet editor before and after. This is fine, but the Non-breaking space between “one” and “year” is rendered as normal space later in on-screen preview as well as in sent emails.

    Hello @w-sky

    Just in case my lack of clear communication was a problem, I’ll re-phrase it this way:

    There are no space characters inside either of the strings I’m suggesting you type:

    This one is a 10-character string (no spaces):   (for inside the source editor)

    This one is a 6-character string:   (for inside the regular editor)

    I’ve just now double-checked my procedure and results (both in Preview and in test-email), in MP 3.78 and then (after updating) in 3.84. The only anomaly I noticed was that after updating to 3.84, I had to clear my browser-cache (rather than simply refresh the window) in the Preview browser-window I had open, in order to see any changes I’d just made in the editor(s). Anyway, that cache-clearing is something you might want to try in any Preview browser-window, after editing (although it shouldn’t affect the sent email, of course).

    P.S. Also sometimes it helps to click “Save”, in your editor, before checking Preview.

    P.P.S. But now I must report something that’s gonna give my credibility a hit: I’m experiencing, now, the same thing you are! And I have no idea what the difference is in the environment, that’s driving this different, unsatisfactory outcome. It may even be something different in the WP environment…

    Nor does anything I tried instead, work — such as switching to numeric HTML entities:   and   — no joy with either.

    At this point I feel we’re both left needing MP to step up and make this work — CONSISTENTLY, whatever way one must deploy it — for the sake of the users!

    P.S. I even tried pasting in a raw, UTF-8 encoded NBSP Unicode character — which seemed to take, but only in the regular editor; but it didn’t carry thru, into either the source editor or the Preview.

    • This reply was modified 8 months, 2 weeks ago by andy.carver.
    • This reply was modified 8 months, 2 weeks ago by andy.carver.
    • This reply was modified 8 months, 2 weeks ago by andy.carver.

    Hi @treibalen Please note this important issue. Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Non-breaking space HTML code “nbsp” does not work’ is closed to new replies.