Visual inline diff view strips out HTML5 elements

Created on 5 August 2021, about 4 years ago
Updated 22 March 2023, over 2 years ago

Problem/Motivation

Comparing revisions using the visual inline diff layout, strips out HTML5 (such as <section> <article> ....etc). These elements are replaced by <div> and <span> tags and as a result the page loses styles.

Proposed resolution

The HTMLPurifier itself is stripping out these elements. Perhaps the diff module could add a feature to allow for HTML5 Definitions for the HTML Purifier. These definitions are available: https://github.com/xemlock/htmlpurifier-html5

For the patch to work or to test, you will need to install https://github.com/xemlock/htmlpurifier-html5
composer require xemlock/htmlpurifier-html5

Feature request
Status

Needs review

Version

1.0

Component

Diff builder plugins

Created by

🇬🇧United Kingdom adstokoe

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

    Implements and supports the use of HTML5.

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