Gutenberg: "Wrong" character in title

Created on 26 Jan 2020  路  6Comments  路  Source: WordPress/gutenberg

I have the Gutenberg 7.3.0 plugin installed but the issue happend also with former versions. Deactivating the Gutenberg plugin and the issue is gone.

What happened.

I post a new post (not page) with an apostrophe (') in the title. Within the database there is no apostrophe, instead there is & # 3 9 ; (without spaces) written.
On the webpage there is no issue, this will be tranformed back to an apostroph... but Mailpoet does this not. Within my newsletters (new post notification) it will we used exactly what is in the database, means "What's" will be displayed as "What& # 3 9 ;s" (without spaces).

Think Mailpoet is not the only plugin (while it is a very common plugin) which displays exactly the database entry.

Keywords: unicode, apostrophe, post title, encoding

[Package] Editor [Status] In Progress [Type] Bug [Type] Plugin Interoperability

Most helpful comment

This behavior seems to have been introduced with #18616.

It's not strictly _wrong_ to escape the entities (replace the apostrophe), in that the output is valid HTML which can be faithfully represented on the front of the site and anywhere else which can display HTML. If Mailpoet is unable to unable to handle this sort of HTML, then that is perhaps an issue that they need to fix.

That being said, I don't think it's _needed_ or _desirable_ to escape these characters in the title:

  • It will cause default title "texturize" behavior to skipped, because these characters are only replaced if left unescaped (source).
  • It is intended that titles can include HTML, which this behavior would prevent.
  • Evidenced by this issue, it may be more prone to interoperability issues with other plugins and services.

Recommendation: Revert #18616

cc @retrofox @obenland

All 6 comments

Any update here?

@nagayama @joemaller @koke @prtksxna

This behavior seems to have been introduced with #18616.

It's not strictly _wrong_ to escape the entities (replace the apostrophe), in that the output is valid HTML which can be faithfully represented on the front of the site and anywhere else which can display HTML. If Mailpoet is unable to unable to handle this sort of HTML, then that is perhaps an issue that they need to fix.

That being said, I don't think it's _needed_ or _desirable_ to escape these characters in the title:

  • It will cause default title "texturize" behavior to skipped, because these characters are only replaced if left unescaped (source).
  • It is intended that titles can include HTML, which this behavior would prevent.
  • Evidenced by this issue, it may be more prone to interoperability issues with other plugins and services.

Recommendation: Revert #18616

cc @retrofox @obenland

Sure, Mailpoet can work on this, too. But why don't we fix it directly in Wordpress / Gutenberg? Any point which points against this?

My point is, that Mailpoet will not be the only plugin which use exactly what is written in the database, so solving it on the Gtenberg editor end would be the best solution.

@Sven74Muc I recommended a change in Gutenberg in my previous comment.

Recommendation: Revert #18616

@aduth thanks for taking over this issue and adding this to WordPress 5.4 Must Have

Was this page helpful?
0 / 5 - 0 ratings