Opened 9 years ago
Closed 9 years ago
#32744 closed defect (bug) (invalid)
Post Editor Automatically Deletes Soft Hyphens
Reported by: | Chriki | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2.2 |
Component: | Editor | Keywords: | close |
Focuses: | Cc: |
Description
Wordpress 4.2.2 automatically deletes soft hyphens from my posts. This happens either:
- when I switch between the visual and text views of the editor, or
- when I save the post.
I have tried to add soft hyphens in various ways:
- added using the “Select custom character” pop-up window from the visual view
- added by copy and paste into both the visual and text views
- added in the text view using the
­
HTML entity
In all cases the soft hyphens were automatically deleted by the editor. This shouldn’t happen since soft hyphens are required for suggesting line break opportunities for web browsers when automatic hyphenation is in use.
Change History (3)
#2
@
9 years ago
Thank you, azaozz, for the quick and thorough reply!
You are absolutely right, I should have researched this better. My browser simply ignores the soft hyphens for some reason and I blamed the Wordpress editor … I’m sorry.
The soft hyphens are still there (more than needed by now). So, a way of showing non-printing (i.e., both invisible and whitespace) characters would indeed have been quite helpful here – something like the “Non-printing characters” toolbar button in LibreOffice Writer. But that’s probably a different ticket.
This ticket can be closed, I guess. Should I do this myself?
Thanks again!
Hi Chriki, welcome to the WordPress core trac.
Adding soft hyphen (U+00AD) characters in the editor is working properly here. They are normally invisible. From Wikipedia:
In WordPress TinyMCE is set to convert almost all HTML entities to characters, so even if you paste
­
in the Text editor, it will be converted to the U+00AD character after switching to the Visual editor. There's no good way to see these characters other than to preview the content and resize the window until a word is wrapped.You can also check if they exist from the browser console:
TinyMCE has a menu item to (temporarily) show invisible characters, but the menu is not used in WordPress by default. A plugin can be installed to enable it. Perhaps we can add a keyboard shortcut for that (although it seems a bit buggy)?