Opened 8 years ago
Closed 8 years ago
#37808 closed defect (bug) (fixed)
Zero-width space stripped by TinyMCE again
Reported by: | nathanwells | Owned by: | iseulde |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Starting from Wordpress 4.3.x TinyMCE started stripping out zero-width spaces (\u200B) from posts which essentially destroys line-break formatting in the Khmer language (especially on mobile devices). This bug was removed once already four years ago (#21025) and so it is a regression. We've alerted the TinyMCE team on GitHub but also wanted to alert the Wordpress team so we can see this fixed.
Change History (14)
#1
follow-up:
↓ 4
@
8 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#2
@
8 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 4.6.1
Fix from TinyMCE: https://github.com/tinymce/tinymce/commit/1696e387e818d9c3f4e2e2d8871f0218208a0212
Let's consider it for 4.6.1 with the other TinyMCE fixes, otherwise it will be for 4.7.
#3
@
8 years ago
Please note the comments from spocke: https://github.com/tinymce/tinymce/issues/2859#issuecomment-241992872
#4
in reply to:
↑ 1
@
8 years ago
Replying to iseulde:
Thanks for the report and welcome to Trac! Is this problem new to 4.6?
No, it is not new - started in Wordpress 4.3.x but since the but was only posted in the TinyMCE GitHub I thought it would be good to bring attention to it here as well since it impacts Wordpress (and since the previous time this happened, it was dealt with here). Also it is not new in the fact that it was fixed once already, but now the code has regressed and needs to be patched again.
We are also using that character for the text patterns, but it is carefully inserted and removed again. We are not removing just any character. We should maybe use \uFEFF though if the other is used in some languages, but I'm not sure if there were any problems with that one.
I would think using \uFEFF could be a good option for us (the Khmer language). Based on Wikipedia, some languages used to use \uFEFF as a type of zero-width space but that has now been depreciated, and it is used exclusively as the BOM Wikipedia:Word Joiner and Unicode FAQ
Appreciate your time on this!
#7
follow-up:
↓ 9
@
8 years ago
IMHO we should patch this in 4.6.1. That means we will have to push an update to TinyMCE which might cause some "caching jitters" on a few sites for a day, but having the editor strip a character that was typed by the users is a "high impact" bug.
Thinking best would be to backport the above fix to the current TinyMCE version in 4.6. That way we will minimize any possibilities of breaking something else in 4.6.1.
#9
in reply to:
↑ 7
@
8 years ago
- Keywords has-patch removed
Replying to azaozz:
Turns out this is not that simple. Changing the zero-width space char (placeholder) in TinyMCE requires other changes and fixes, most for IE. See https://github.com/tinymce/tinymce/commit/16750c20fdba279ff98f0e45aea5e859b1384e27.
In that terms we would have to backport several changes that are (mostly) untested in WordPress. Not sure this is good for a dot release. This would have been very nice to fix but is not a regression from 4.5. Seems better to leave it for 4.7.
This ticket was mentioned in Slack in #core-editor by azaozz. View the logs.
8 years ago
#11
@
8 years ago
- Milestone changed from 4.6.1 to 4.7
This is fixed upstream and will be fixed in WordPress when we update TinyMCE in 4.7.
Thanks for the report and welcome to Trac! Is this problem new to 4.6?
I see the GitHub issue was acknowledged by TinyMCE in April.
We are also using that character for the text patterns, but it is carefully inserted and removed again. We are not removing just any character. We should maybe use \uFEFF though if the other is used in some languages, but I'm not sure if there were any problems with that one.