Changes between Initial Version and Version 1 of Ticket #42340, comment 4
- Timestamp:
- 10/26/2017 11:48:57 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #42340, comment 4
initial v1 1 1 When a user copies-and-pastes, the presumption should be that the source was marked-up as intended by whomever or whatever created it. Otherwise, if the source has inline elements, then the copy-and-paste may fail after conversion, in a way that is perfectly mysterious to users who aren't used to doing their own mark-up. 2 2 3 I've not dived into the code (nor do I intend to do so), but I would guess that at some point WordPress converts two consecutive newlines into two break elements, and that wpautop effectively assumes that all back-to-back instances of two break elements arose from such a conversion. Assuming both that my guess is correct and that there is a good reason for that first conversion, I suggest that it be replaced by a substitution such as “<br /><!-- convertible --><br />” and that wpautop act when it encounters this new substring, leaving alone two back-to-back break elements.3 I've not dived into the code (nor do I intend to do so), but I would guess that at some point WordPress converts two consecutive newlines into two break elements, and that wpautop effectively assumes that all back-to-back instances of two break elements arose from such a conversion. Assuming both that my guess is correct and that there is a good reason for that first conversion, I suggest that it be replaced by a substitution such as “<br /><!-- wpautop convertible --><br />” and that wpautop act when it encounters this new substring, leaving alone two back-to-back break elements.