Closed
Description
Issue Overview
I wanted to add a header, with part of the text being enclosed in a <span></span>
tag. When I tried to add the span tag in the Visual Editor, it simply escaped the angle brackets (which was expected).
I then switched to the Code Editor, added in the span tags to my Headers and saved my draft
When I viewed the page on the front-end, the headers included my span tags as expected.
I then wanted to edit the span tags but now, every time it auto-saves, it removes my span tags.
Steps to Reproduce (for bugs)
- Create new page
- Add several Header blocks
- Switch to Code Editor
- Edit the Header blocks by adding some text within a span tag (e.g.
<span>some text</span>
) - Save draft
- Switch to back Visual Editor
- Preview page and verify span tags exist in headers
- Switch to Code Editor again
- Add span tags to Header blocks again (as content has been stripped by the switch back to the Code Editor)
- As soon as the page auto-saves, it strips the span tags
Expected Behavior
Allowable tags such as <span></span>
shouldn't be stripped when in the Code Editor either when saving or auto-saving
Current Behavior
Strips allowable tags
Gutenberg 2.5.0
Firefox Quantum 59.0.2 (64-bit)
WP 4.9.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment