Jetpack: Related Posts: Apostrophes in Titles Renders as HTML Entity Number

Created on 20 Jan 2020  Â·  19Comments  Â·  Source: Automattic/jetpack

Steps to reproduce the issue

This only seems to happen on WordPress.com simple sites.

  1. Visit any single post page with a Jetpack Related Posts section at the bottom (Twenty Ninteteen, for instance, does this by default)
  2. Edit one of the posts you see in that section, and add a normal apostrophe to the title ( ' )
  3. Save the post you edited, and refresh the single post page where you have the Related Posts section open on
  4. Notice how the apostrophe renders as '

What I expected

I expected an apostrophe '

What happened instead

I got ' instead

Screenshots
Without an apostrophe '

image

With an apostrophe '

image

Issue reported in 2640192-zen, and I as able to recreate this on my own Premium plan with TwentyNineteen active, on Chrome and Firefox.

Related Posts [Status] Blocked / Hold [Type] Bug [Type] Happiness Request

Most helpful comment

@damiannep Good catch!

It looks like it's still an issue in Gutenberg at the moment, and may be fixed as of this PR:
https://github.com/WordPress/gutenberg/pull/19955

Let's wait until this lands in Gutenberg, and is then shipped on all WordPress.com sites.

All 19 comments

I can't seem to be able to reproduce on my end:

screenshot 2020-01-20 at 10 43 49
screenshot 2020-01-20 at 10 41 59

Which apostrophe did you use in your posts?

' or ’?

Could you also let me know if you've set a custom character encoding on your site and / or a custom language, other than utf-8 / en_US?

Thank you.

Images are from standard, Premium-plan sites.
Both site are just the default English as per Manage » Settings » Language
I tested this with English (UK) too, results are the same for me.
No special encoding was selected anywhere (that I'm aware of), sites are just created as per my default WPCOM profile, i.e. English.
My keyboard is standard Apple Extended Keyboard, and my system language is set to English (UK).
I used a ' - the one that sits between ; and \under the right-hand pinky (touch typing)

This image is from a test Premium-plan site: https://jcopremium.wordpress.com/2019/08/11/ratings-blocks/, where the theme TwentyNineteen is active. Related Posts can be toggled via the Tools » Marketing » Traffic » Related posts setting, and looks like this:

image

It's irrespective of "Show a thumbnail image where available" being on/off

image

If I use a Related Posts Block in the editor instead, the block shows the entity in the editor, but renders fine on the front-end, and blocks the built-in Related Posts from showing:

image

image

These images are from a new test Premium-plan site: https://jcoprem2020.design.blog/2020/01/08/example-post/. Active theme is Maywood, which doesn't have Related Posts built in, so ignores the settings you can set in Tools » Marketing » Traffic, but you can use the Related Posts Block in the Editor. In Maywood, the block in the editor also shows the error, but renders fine on the front-end.

Block in the Editor:

image

Front-end:

image

@jeherve

I can’t reproduce this on my Jetpack test site. However, I am seeing it on a wpcom site - see p9dueE-1aq-p2.

2668689-zen

Reproduced issue with Twenty Nineteen on wpcom simple site, works as expected on atomic site.

Same problem in 2668839-zen

Same problem in 2669039-zen

@damiannep Good catch!

It looks like it's still an issue in Gutenberg at the moment, and may be fixed as of this PR:
https://github.com/WordPress/gutenberg/pull/19955

Let's wait until this lands in Gutenberg, and is then shipped on all WordPress.com sites.

Internal reference: pbAok1-dx-p2

Another report in 18575571-hc

2717300-zen

Another report in 13342089-hc

Any posts with ' in the title get that rendered as&#039in the related post list on single post pages. Theme is Hermes and is a simple site.

Another case here: 2718529-zen . Simple site and theme Publication.

Also reported here: 18925743-hc

Another report in 19283860-hc

Another report - 2783476zd / 19308983hc

Theme: Twenty Twenty
Site language is English but site interface language is:

Screen Shot 2020-03-11 at 3 52 08 PM

19358377-hc

Independent Publisher 2

This is resolved in the latest Gutenberg version on WordPress.com. Let us know if it continues happening!

Was this page helpful?
0 / 5 - 0 ratings