Making WordPress.org

Opened 2 months ago

Last modified 2 months ago

#7466 new defect (bug)

<span aria-hidden="true"> in <meta name="description"> breaks layout

Reported by: takayukister's profile takayukister Owned by:
Milestone: Priority: normal
Component: Support Forums Keywords:
Cc:

Description

See this forum topic: https://ja.wordpress.org/support/topic/%e3%83%8f%e3%83%b3%e3%82%ac%e3%83%bc%e3%83%a1%e3%83%8b%e3%83%a5%e3%83%bc%e3%81%ae%e7%b7%a8%e9%9b%86%e6%96%b9%e6%b3%95%e3%81%8c%e5%88%86%e3%81%8b%e3%82%89%e3%81%9a%e5%9b%b0%e3%81%a3%e3%81%a6%e3%81%84/

It seems the user input "→", the system wrapped it with

<span aria-hidden="true"></span>

, then it was included into

<meta name="description">

and

<meta name="og:description">

contents without being escaped.

<meta name="og:description" content="ハンガーメニューの編集方法が分からず困っています。関連ありそうな部分としては外観<span aria-hidden="true">→</span>ウィジェットに&hellip;" />
<meta name="description" content="ハンガーメニューの編集方法が分からず困っています。関連ありそうな部分としては外観<span aria-hidden="true">→</span>ウィジェットに&hellip;" />

Attachments (1)

スクリーンショット 2024-02-14 12.40.29.png (55.0 KB) - added by takayukister 2 months ago.
Screenshot shows broken layout

Download all attachments as: .zip

Change History (3)

@takayukister
2 months ago

Screenshot shows broken layout

#1 @dd32
2 months ago

This is caused by https://github.com/WordPress/wporg-mu-plugins/pull/454

However, the existing tags being output are duplicating Jetpack opengraph tags.

For example, with an English support thread:

$ curl -s 'https://wordpress.org/support/topic/ssl-question-for-wordpress-domain-w-3rd-party-hosting/' | grep 'description"'
<meta property="og:description" content="Support &raquo; Installing WordPress &raquo; SSL Question for WordPress Domain w/ 3rd Party Hosting SSL Question for WordPress Domain w/ 3rd Party Hosting pfischer1 (@pfischer1) 7 hours, 58 minutes…" />

<meta name="og:description" content="I am planning to transfer a domain to WordPress.com. I still have a hosting plan elsewhere. That hosting provider charges for SSL cert. Does&hellip;" />
<meta name="description" content="I am planning to transfer a domain to WordPress.com. I still have a hosting plan elsewhere. That hosting provider charges for SSL cert. Does&hellip;" />

WordPressdotorg\Forums\Hooks::meta_description() likely should be replaced a filter on the Jetpack opengraph data.

The header unicode arrow code should also be updated to not affect unexpected locations (ie. attributes).

#2 @dd32
2 months ago

Filed https://github.com/WordPress/wporg-mu-plugins/issues/574 for the over-greedy replacements.

This can remain open to fix the duplicate opengraph tags.

Note: See TracTickets for help on using tickets.