Automattic / Automattic/jetpack
Publicize: use get_the_excerpt() and the_content filter when building og:description
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
hi! right now, when og:description comes from the post excerpt or content, it pulls them directly from the db, bypassing plugins that otherwise modify them via filter and hooks. this can be a problem for sites that depend on those modifications.
#### Steps to reproduce the issue
as an example, i author and store post content in markdown, and use a plugin to render that to HTML. jetpack currently puts the raw markdown content directly into `og:description`. e.g. with this post content:
```
I talked with [Sally](http://sally.com/) recently...
```
#### What I expected
I expected the post content to be rendered, then HTML tags stripped, resulting in:
```
Contributor guide
Research direction
Locate the Publicize code that builds the og:description value and inspect how it currently reads post excerpts and content. Compare those reads with get_the_excerpt() and the_content filtering, then verify that rendered markdown has tags stripped in the metadata output and that the expected description appears in previews.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100