"Basic HTML" text format does not support manual teaser break (<!--break-->)

Created on 2 December 2018, almost 6 years ago
Updated 14 June 2024, 5 months ago

Placing the following line inside the source of a node's body field adds a manual teaser break:

<!--break-->

This works fine when the node uses the "Full HTML" text format. It stops working, however, when I switch the text format to "Basic HTML". I expect manual teaser breaks to work with any text format, if not out of the box then at least by configuring the text format in some way (e.g. by modifying the text format's set of allowed HTML tags).

A similar issue โ†’ already exists for Drupal 7, but In Drupal 7 a workaround exists because it's possible to add <!--> to the "Basic HTML" text format's set of allowed HTML tags (cf. comment 118 โ†’ of the other issue).

The same workaround does not work for Drupal 10 because in Drupal 10 "Basic HTML" treats the set of allowed HTML tags as DOM elements (cf. implementation of the function FilterHtml::getHtmlRestrictions()), but the manual teaser break is a HTML comment.

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Filterย  โ†’

Last updated 6 days ago

No maintainer
Created by

๐Ÿ‡จ๐Ÿ‡ญSwitzerland herzbube

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024