Only if I activate "Display any HTML as plain text" and "Convert line breaks into HTML", the line breaks actually get converted.

If I disable "Display any HTML as plain text", even if the "Convert line breaks into HTML" is on, the line break don't get converted.

Comments

montesq’s picture

Status: Active » Postponed (maintainer needs more info)

I try to reproduce on 7.x-dev without success...
I've created a new text format with both "display any HTML as plain text" and "convert line breaks into HTML", then created a new content with this format -> OK (as your comment suggests it)
Then, I've modified the new text format and select only "convert line breaks into HTML" and I've created a new content with several line breaks -> no problem

Can you give more information about your configuration and try to reproduce your issue on a fresh 7.x-dev installation?

Mgccl’s picture

Status: Postponed (maintainer needs more info) » Active

I justed figured out if the post contain script tags, the line break fails. I don't know what other tags will cause it to fail.
Try the following input

<script></script>
test
line
breaks
montesq’s picture

confirmed with the same text as #2

spongeyxx’s picture

#2 Confirmed as well here.

scito’s picture

It seems to be related to or a duplicate of #1063178: Line break filter will ignore everything following a <pre>xxx</pre> which is fixed in current 7.x-dev. Can you try on dev?

shenzhuxi’s picture

Both 7.0 and 7.x have this problem.

If the text field selects "Plain text" in "Text processing", it happens.

droplet’s picture

Status: Active » Postponed (maintainer needs more info)

what do you get at final ?? and happening on all browsers ? do you installed WYSIWYG?

I tested with D7-dev,
1. disable "Display any HTML as plain text",
2. used #2 to test

working well.

Chris Charlton’s picture

As a temporary fix I installed the "WYSIWYG Linebreaks" module to overcome this formatting issue. I tried the suggestions above but none worked for our case.

WilliamB’s picture

Having the same issu with Drupal 7.2.
Set a multilign textfield as Text processing => Plain text
But it doesn't work, everything get put on the same line.

For plan text i've all 3 checked:
- Display any HTML as plain text
- Convert line breaks into HTML
- Convert URLs into links

Still doesn't work.

sub_acoustic’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Needs work

I have the same problem here...all the settings are right but it won't break my lines whatever I do.....I'll try using WYSIWYG....and CK editor....and WSYIWYG Force Linebreaks, and this doesn't help...(although it all looks fine in the editor) it seems something is removing all HTML from my text whatever my configuration settings and whether I use filtered or full html...

In the page source all the html has been removed and the text is wrapped with these div classes...

<div class="content"> 
    <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">

...maybe one of these classes is killing the linebreaks? Can't make my site live until this is sorted....any ideas?

sub_acoustic’s picture

This seems to be working now, I think it was something to do with the settings for my custom content type.

droplet’s picture

Status: Needs work » Postponed (maintainer needs more info)
pluess’s picture

Version: 7.0 » 7.8
Status: Postponed (maintainer needs more info) » Fixed

I tested this with D 7.0 and text from #2, which reproduces the problem.

Retested with D 7.8 and text from #2, problems does not exist anymore.

I don't know what changed, but the bug as it is reported in #2 is fixed.

droplet’s picture

Status: Fixed » Closed (works as designed)
amontero’s picture

Status: Closed (works as designed) » Postponed (maintainer needs more info)

Still experiencing this under 7.8. Created custom content type. Happens on both default created 'body' field and added 'long text' field.
I'm using built-in 'Plain text' filter as installed. But maybe it's not a bug, but just a UI issue.
In the field editing page, I selected 'Plain text' under 'Text processing'. I expect this option to use the built-in 'Plain text' filter, but seems to me that this option does not use text filtering at all. However, if I select 'Filtered text', everything works as expected.
Maybe it's not a bug, but a matter of stating this more clearly if this is the right behavior.
Reopening so someone can take a look at it.

Also found related issues, maybe I'm not the only who got confused:
#1095838: Plain text format does not honour filter processing
#1102900: Display Body field as 'plain text' does not show newlines

amontero’s picture

Status: Postponed (maintainer needs more info) » Active
catch’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of #1095838: Plain text format does not honour filter processing since that's the older issue and has more activity.