#1894644: Unidirectional editor configuration -> filter settings syncing introduced adding the allowed editor button tags from the JS plugin to the "Allowed HTML tags" field, however, there is an issue with the following elements.
- <caption>
- <tbody>
- <thead>
- <tfoot>
- <th>
- <td>
- <tr>
Upon investigation it appears that the sandbox.innerHTML = allowedTags[t];
is failing to actually create the child element in the "sandbox". This is evident by the later retrieval of the first child's tagname where we get the error TypeError: node is null
.
Since this works as expected for other tags I suspect that this is related to the fact that the above tags cannot exist without being inside a <table> tag.
To replicate
- Add any of the above tags to the "Allowed HTML tags" to any filter that contains "Limit allowed HTML tags and correct faulty HTML".
- Save the configuration
- Re-edit the configuration for the filter.
- Add a new button to the toolbar that should introduce a new tag to the allowed tags.
Comment | File | Size | Author |
---|---|---|---|
#13 | Screenshot 2022-04-06 at 16.04.08.png | 823.22 KB | Frontmobe |
Selection_069.jpg | 379.58 KB | grndlvl |
Comments
Comment #2
grndlvl CreditAttribution: grndlvl at GollyGood Software for Zivtech commentedComment #13
FrontmobeUpon trying to reproduce this issue, I performed the steps as suggested in the original issue:
1. Add any of the above tags to the "Allowed HTML tags" to any filter that contains "Limit allowed HTML tags and correct faulty HTML".
2. Save the configuration
3. Re-edit the configuration for the filter.
4. Add a new button to the toolbar that should introduce a new tag to the allowed tags.
The issue cannot be reproduced this way, I assume it might be solved in https://www.drupal.org/project/drupal/issues/1894644. I attached a screenshot showing the tr element being present in the source after saving and adding a new button to the text filter on a vanilla Drupal 9.3 installation.
Marking this issue as "cannot reproduce" accordingly.