• Hi,
    I love your plug-in, thanks, but I’m experiencing a little problem within the HTML format.
    Almost all the HTML code from the content seems to get copied into the variables %POST_EXCERPT% and %POST_CONTENT% (when using HTML format), except the linebreaks. As a result all of the text from the content appears as one big block, while all of its other format is maintained.
    The introductory text above the variables will show line breaks if I use <p> tags.
    Now that Email Users can send to roles and UAM groups, I’d like to switch back to it from EMU2, but thi sis a bit of a show stopper…
    Thanks in advance.

    Peter

    https://www.ads-software.com/plugins/email-users/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    Email Users doesn’t do any processing on the post content. It simply performs a get_the_content() or get_the_excerpt() call and places the result into the message body.

    Some email programs (e.g. Outlook) remove line breaks to be “helpful” – have you viewed the content with more than one email client? Does it look the same on all of them? If you view the HTML source for the post and then the resulting email, are they different?

    Thread Starter ikookmaar

    (@ikookmaar)

    Thanks for your super-quick answer.
    I thought of that too, but it looks the same in a browser showing webmail. Actually, the preview pane in the Email Users settings alsso shows the tekst without the line breaks…

    Peter

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Do you have the wpautop filter disabled? That would do exactly what you’re describing. See the end of the wpautop documention page where it describes how some themes remove it.

    Thread Starter ikookmaar

    (@ikookmaar)

    Thanks, I’ll check that.
    But wouldn’t that mean that the line breaks and paragraphs will be stripped from the posts themselves ? Or could they be re-added by the theme (answering my own question)?

    P.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Without looking into the details it is hard to speculate exactly what is happening. Do you have shell access to your site? If so, it would be a pretty simple Unix “find” command to see if wpautop might be the culprit. That is where I would start looking.

    There are other filters (e.g. the_content) which can also manipulate post content and something like that could also be the culprit. Another easy thing to do is to disable all of your plugins except Email Users and see if the behavior persists. If the expected line breaks are present, then one of the plugins is the culprit and you can enable them one at a time until you determine which is causing the problem.

    If disabling all plugins but Email Users still doesn’t restore the line breaks, try switching to one of the default WordPress themes and see if that works.

    Unfortunately a lot of times it is a process of elimination to figure our what is conflicting with what.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘line breaks stripped from content and excerpts’ is closed to new replies.