Broken link in OpenGraph description for a category

What and who is affected by this issue/request?

The og:description meta tag for the Foundation category contains HTML links. This does not display correctly in at least some OpenGraph consumers.

Where on the platform does it happen?

This is visible with links to this platform from social sites. Here is an example screenshot from Element:

How do we replicate the issue?

Share a link to a category that has a link in its description on Element.

Expected behavior (i.e. solution)

Depending on how the OpenGraph standard is to be interpreted, it is possible that og:description should be plain text. In this case, Discourse should either strip links from the description before outputting it in the meta tag, or we have to consider whether we forgo links in category descriptions.

@Firefishy do we know if this is configurable or a bug we need to report?

There’s hardly going to be a “produce invalid opengraph descriptions” checkbox… It’s a bug upstream I assume.

As per Tom’s reply. It is likely an upstream issue, but I have been unable to find anyone else documenting this bug.

Discourse seem to have removed the public bug tracker: Pull requests · discourse/discourse · GitHub

I think you’re supposed to start a discussion in bug - Discourse Meta to report a bug.


In the meantime I moved the link to an additional paragraph on the “About this category” so it doesn’t mess up with the description.

1 Like