When hand-coding html and line breaks are entered, line breaks are rendered as line breaks by the 'Covert line breaks' filter in core unlike in the 3.x branch

Created on 6 February 2024, 11 months ago

Problem/Motivation

When using plain text instead of the CK Editor 5 plugin, if a content editor writes

Content <footnotes data-value="">
Text here
</footnotes> more content.

Instead of:

Content <footnotes data-value="">Text here</footnotes> more content.

Then the line breaks are converted to line breaks by "Convert line breaks into HTML (i.e. <br> and <p>)" filter, if it is set to run before the Footnotes Filter.

This differs from the 3.x branch which stripped out line breaks within the footnotes even when line breaks were added to the editor.

💬 Support request
Status

Closed: works as designed

Version

4.0

Component

Footnotes

Created by

🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @John_B
  • 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
  • Status changed to Closed: works as designed 11 months ago
  • 🇬🇧United Kingdom scott_euser

    Clarified the summary to reflect the scenario; need to bear in mind that, while I do not have any hard data, I expect the vast majority of people are:

    1. Using CK Editor
    2. Using the footnotes module for footnotes rather than call-out boxed text type content

    Arguably in 3.x the user should have expected line breaks to be converted to line breaks, but anyways, useful if someone comes across this: the easiest way to address in case you also use the above scenario hand-coding your html and adding line breaks within footnotes, you can strip line breaks for example in twig since footnotes are output in twig templates. Eg, trim accepts arguments for example.

Production build 0.71.5 2024