- π³πΏNew Zealand danielveza Brisbane, AU
No other comments or other people reporting the bug in 3+ years. This is safe to be closed.
Feel free to reopen if anyone disagrees
Warning: DOMXPath::query(): Invalid expression in Drupal\filter\Plugin\Filter\FilterHtml->filterAttributes() (line 135 of core/modules/filter/src/Plugin/Filter/FilterHtml.php).
At line 135, this code...
foreach ($xpath->query('//' . $allowed_tag . '[@*]') as $element) {
$this->filterElementAttributes($element, $allowed_attributes);
}
...results in a warning in some cases because $allowed_tag is an empty string. Can be fixed by checking for empty around line 115...
foreach ($restrictions['allowed'] as $allowed_tag => $tag_attributes) {
if (!empty($allowed_tag)) {
Though I'm not sure that's the best fix. Normally arrays are not keyed with empty strings, so it might be necessary to consider why the first item in $restrictions['allowed'] is keyed with an empty string.
This is in a fresh install of Drupal 8. I have created one content item and set the text format in the Body field to Restricted HTML. Setting it to Basic HTML and visiting the content item also triggers the warning. Setting it to Full HTML does not trigger the warning.
Closed: cannot reproduce
9.5
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No other comments or other people reporting the bug in 3+ years. This is safe to be closed.
Feel free to reopen if anyone disagrees