Using Filtered HTML input format writing a page, if you use the html tag <br /> instead of the simple <br> the text does not goes on a new line.

Try typing (all must be on the same row)

line 1<br />line 2<br />line 3

you'll get the wrong

line 1line 2line 3

If you type

line 1<br />
line 2<br />
line 3

you'll get the right

line 1
line 2
line 3

This is really unhandly since there are html editor modules that sometime put all on the same row (and also the user can choose how to write it)

Comments

HedgeMage’s picture

Status: Active » Closed (won't fix)

If you'd like to, you are more than welcome to add <br/> to the "Filtered HTML" input type at http://www.example.com/admin/settings/filters (where www.example.com is the URL of your Drupal site).

You could even add <br /> if you really wanted to, but IIRC the standard is to use no space.

There's no sense in changing core's filters to accomodate a contrib module. The module could change the filter or add a new one if the dev felt like it.

devbox’s picture

I already tryied it: it does the same behavior: it is a BUG:

Try to type this

line 1<br />line 2<br />line 3
line 4<br />
line 5<br />
line 6

this work, it gives:

line 1
line 2
line 3
line 4
line 5
line 6

Try my way:

line 1<br />line 2<br />line 3
line 4<br />line 5<br />line 6

you'll get

line 1line 2line 3
line 4line 5line 6

This if using <br> or <br />, and if they are added to the "Filtered HTML" input type or not.

If someone could tell what to check I can thank him.

devbox’s picture

Can you tell me what is the code that apply the input format?
I need to fix this!

devbox’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

Ok, I found the problem (I think).
In the Filtered HTML input format we need to uncheck the "Line break converter", I don't know why this solve that problem.

But there is another good bug: If I have tag as

<hr width="100%" size="2" />

the hr tag is not valuated and it is removed by the post also if it is added to the Filtered HTML input format - Filtered HTML input format.
If hr has attributes is not validated.

Thanks

catch’s picture

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

Pretty sure it's designed to stop those attributes going in. You can always use "full html" if you need to do this yourself. Best to add a class to the


tag and style it with that though.
christefano’s picture

Version: 5.2 » 5.x-dev
Status: Closed (works as designed) » Active

Using Full HTML isn't an option on most sites (such as groups.drupal.org, where the <br /> tag has been requested). As much as I want to avoid opening old issues, I'm not sure that this was ever by design. It looks to me like this is a conflict between two core input filters.

dpearcefl’s picture

Status: Active » Closed (won't fix)

Considering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.