redactor icon indicating copy to clipboard operation
redactor copied to clipboard

Redactor adds trailing slash to br elements (ie. <br />)

Open dgsiegel opened this issue 2 years ago • 2 comments

Description

When forcing manual line breaks in redactor fields, e.g.

foo
bar
baz

redactor will put a <br /> element in between them, e.g.

<p>foo<br />bar<br />baz</p>

I'd like to get rid of the trailing slash, as that's not recommended in HTML5.

Additional info

  • Craft version: 3.7.55.2
  • PHP version: 8.1.10
  • Database driver & version: MySQL 10.5.16
  • Plugins & versions: Redactor 2.10.10

dgsiegel avatar Oct 01 '22 16:10 dgsiegel

Same problem with Craft 4.2.5.1 and Redactor 3.0.2.

BlizzardWizzard avatar Oct 07 '22 12:10 BlizzardWizzard

I imagine this is for backwards compatibility with XHTML. The plugin may be agnostic toward the doc type.

timstrawbridge avatar Jan 20 '23 03:01 timstrawbridge