Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
montesq CreditAttribution: montesq commentedI 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?
Comment #2
Mgccl CreditAttribution: Mgccl commentedI 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
Comment #3
montesq CreditAttribution: montesq commentedconfirmed with the same text as #2
Comment #4
spongeyxx CreditAttribution: spongeyxx commented#2 Confirmed as well here.
Comment #5
scitoIt 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?
Comment #6
shenzhuxi CreditAttribution: shenzhuxi commentedBoth 7.0 and 7.x have this problem.
If the text field selects "Plain text" in "Text processing", it happens.
Comment #7
droplet CreditAttribution: droplet commentedwhat 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.
Comment #8
Chris CharltonAs 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.
Comment #9
WilliamB CreditAttribution: WilliamB commentedHaving 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.
Comment #10
sub_acoustic CreditAttribution: sub_acoustic commentedI 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...
...maybe one of these classes is killing the linebreaks? Can't make my site live until this is sorted....any ideas?
Comment #11
sub_acoustic CreditAttribution: sub_acoustic commentedThis seems to be working now, I think it was something to do with the settings for my custom content type.
Comment #12
droplet CreditAttribution: droplet commentedComment #13
pluess CreditAttribution: pluess commentedI 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.
Comment #14
droplet CreditAttribution: droplet commentedComment #15
amonteroStill 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
Comment #16
amonteroComment #17
catchMarking this as a duplicate of #1095838: Plain text format does not honour filter processing since that's the older issue and has more activity.