Add a HTML-purifier-less visual layout plugin

Created on 16 January 2023, over 2 years ago
Updated 21 January 2023, over 2 years ago

Problem/Motivation

The stock Visual layout plugin is not HTML-5 compatible. See https://www.drupal.org/project/diff/issues/3226910 ✨ Visual inline diff view strips out HTML5 elements Needs review for a ~ 1.5 year old issue with history.

I'm not convinced that HTMLPurifier is needed, given that Drupal manages its own rendering pipeline in its entirety. Adding another step to the process that may produce an entirely different version of markup than end-users might see doesn't seem ideal.

Proposed resolution

Since 0.1.14, caxy/php-htmldiff has an option to completely turn off HTMLPurifier. I think this is the best approach to the problems faced by #3226910.

Remaining tasks

  1. Decide what to name the new layout plugin

    Perhaps Visual Inline (HTML5)?

  2. Determine the user-configurable options

    None for a MvP. Any options can be added in follow-up feature requests.

  3. Determine how to version-detect that caxy/php-htmldiff supports no-purifier mode.

    Specify a minimum version of caxy/php-htmldiff via composer.json.

  4. Open follow-up tasks for making the UX for certain element types better

User interface changes

  1. A new layout plugin type will be added.

    1. API changes

      None.

      Data model changes

      None.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

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