Problem/Motivation
I am working on a site which requires quite a specific and detailed element/attribute whitelist. My "allowed_html" setting is 1200 characters long. When updating this, it's impossible to tell from a diff what changed. In addition to this, we've found that changes manually made to the attributes and classes are reverted, chopped and changed by Drupal.behaviors.filterFilterHtmlUpdating erroneously, possibly from a bug in the JS or one of the filters we have installed.
It would be great if the schema that stored these settings provided a better diff.
Proposed resolution
Update the schema to look something like:
allowed_html:
type: sequence
label: 'Allowed HTML'
sequence:
type: sequence
label: 'Attributes'
sequence:
type: string
label: 'Value'
Which would transform settings like:
allowed_html: '<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type>'
Into:
allowed_html:
a:
href: '*'
hreflang: '*'
em: { }
strong: { }
cite: { }
blockquote:
cite: '*'
code: { }
ul:
type: '*'
ol:
start: '*'
type: '*'
Remaining tasks
Validate & see if this is something we can achieve without breaking BC.