Opened 11 years ago
Closed 10 years ago
#28302 closed defect (bug) (duplicate)
All text disappears from view when one line ends with a-grave, then saving a draft from visual editor
Reported by: | niente0 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | dev-feedback wpautop |
Focuses: | Cc: |
Description
Hello, these are the steps to reproduce the bug:
- new article, text editor
- copy-paste these 3 lines (accented letter included):
line one
line twoà
line three
- click on visual editor
- save draft
The text disappears. How to fix it?
Change History (14)
#2
@
11 years ago
Hello, thanks for your quick response.
I have no plugins installed and I tried different themes on different machines.
I suspect it's something related with some char-related settings in PHP.INI (I'm using UTF8 general-ci in WP, PHP and MySQL db)...
#3
follow-up:
↓ 4
@
11 years ago
Hello again. I have tested the problem again with your configuration with Spanish and base installation. Still without being able to reproduce the problem.
Do you mind if we move this conversation to Support forums? If we find that it has something to do with the WordPress code and not with your installation or the Italian one, we can come back to the trac at any time.
#4
in reply to:
↑ 3
@
11 years ago
Replying to bi0xid:
Hello again. I have tested the problem again with your configuration with Spanish and base installation. Still without being able to reproduce the problem.
Do you mind if we move this conversation to Support forums? If we find that it has something to do with the WordPress code and not with your installation or the Italian one, we can come back to the trac at any time.
Yes, no problem for me :-)
FYI: I tried with a clean install of WP 3.9.1 on my local machine (default theme, no added plugins), the bug persists.
#5
@
11 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
- Version 3.9.1 deleted
I can actually confirm this using 3.9-alpha (trunk), but not in 3.9.1. Also
a
bà
c
disappears when entered in text mode, then saved from visual mode. It seems only to happen when there are at least three lines, and the second line ends with à
.
Should be investigated.
#6
@
11 years ago
It happens when there are any number of lines, as long as there is a line after the line ending with à
.
So the sequence à<newline><anychar>
is what destroys something, after swtching to visual. So
à
b
also fails. I cannot reproduce using other accented characters, but I have not tested all yet.
#7
@
11 years ago
- Component changed from Editor to TinyMCE
Worth noting that the text does get saved, and previewing the draft reveals this, even if the à
doesn't print properly (question mark) . It certainly disappears from the visual editor view and when saved again, it's completely gone.
#8
@
11 years ago
- Keywords dev-feedback added
- Summary changed from This particular text disappears when saving a draft to All text disappears fornm view when one line ends with a-grave, then saving a draft from visual editor
Tested on:
WordPress 4.0-alpha with Twenty Fourteen, no plugins active, blog charset UTF-8
PHP 5.4.21, Mysql 5.5.27, IIS/7.0
#9
@
11 years ago
- Summary changed from All text disappears fornm view when one line ends with a-grave, then saving a draft from visual editor to All text disappears from view when one line ends with a-grave, then saving a draft from visual editor
#10
@
11 years ago
Testing in FF, Chrome and IE11 in trunk, not able to reproduce. Could you add some more info: which browser, locale settings, browser charset perhaps, anything else?
...even if the à doesn't print properly (question mark)
So something is "eating" part of that multibyte UTF char. Sounds like this may be related to how PCRE handles \s
with different server locales, see https://core.trac.wordpress.org/ticket/22692#comment:58 and the discussion there. But then this should happen regardless of which editor was used and in all versions of WP.
#11
@
11 years ago
Looking further, pretty sure this is the same PHP/PCRE problem as described in #22692. The hex for that letter is 0xC3 0xA0
(ref: http://www.fileformat.info/info/unicode/char/e0/index.htm), so \s
would match/strip 0xA0
in some cases. That only happens when it is the last letter on the row and there is more content after, most likely in wpautop().
#12
@
11 years ago
which browser, locale settings, browser charset perhaps, anything else?
Tested with Firefox 29, IE9 and Chrome 34, all with nb_NO language setting. Server has PCRE library 8.32. WordPress has UTF-8 and nb_NO.
#14
@
10 years ago
- Keywords wpautop added
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from reopened to closed
Duplicate of #27733.
Let's focus on the existing ticket and just reference the a-grave for testing. I have recently started getting my toes wet with autop and should have some ideas ready for 4.3 or 4.4.
I cannot reproduce it using 4.0-alpha, 3.9.1 or 3.9.
Maybe it's a plugin/theme problem and you need some support.