Make AutoP Block Definitions Customizable

Created on 1 April 2015, over 9 years ago
Updated 22 February 2023, over 1 year ago

Currently we hard code block level elements into _filter_autop:

$block = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|input|p|h[1-6]|fieldset|legend|hr|article|aside|details|figcaption|figure|footer|header|hgroup|menu|nav|section|summary)';

If a site is using a custom DTD, this could cause custom block-level elements to get wrapped in paragraph tags. Perhaps we should look at storing the block level elements in configuration, so that sites or filter plugins could add additional block level elements?

Doing this would not break any backwards capabilities, as we're simple just changing the way $block is defined.

✨ Feature request
Status

Closed: duplicate

Version

9.5

Component
FilterΒ  β†’

Last updated about 9 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States Jamie Holly

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

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