Repository navigation
fix(og-tags): detect mixed-case property values and name-attribute fallback (PRE-2238) - #4
Merged
Merged
Conversation
marceloprerender
force-pushed
the
fix/og-tag-detection-pre-2238
branch
5 times, most recently
from
May 5, 2026 12:49
72dbe5a to
a4a638d
Compare
…llback (PRE-2238) The og-tag check was reporting tags as missing when they were present in the HTML for two real-world patterns: - mixed-case attribute values (e.g. property="OG:Title") — CSS attribute selectors are case-sensitive on values by default - name="og:title" instead of property="og:title" — used by some CMSes and SEO plugins Both now match. Bumps to 1.5.2. Refs: https://linear.app/prerender/issue/PRE-2238
marceloprerender
force-pushed
the
fix/og-tag-detection-pre-2238
branch
from
May 5, 2026 13:06
a4a638d to
1e3b286
Compare
marceloprerender
marked this pull request as ready for review
May 5, 2026 13:06
actions/cache@v2 is deprecated and now hard-fails. Also bumps checkout, setup-node, and action-gh-release to v4/v2 to avoid upcoming deprecations. node-version 14.x → 18.x.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the long-standing customer-visible bug where the SEO score modal in the Prerender dashboard reports OG meta tags as missing when they are present in the cached HTML.
The current scorer only checks
meta[property=\"og:...\"], but real-world pages use two other patterns it doesn't handle:<meta property=\"OG:Title\" ...>. CSS attribute selectors are case-sensitive on values by default.nameattribute instead ofproperty— used by some CMSes and SEO plugins, e.g.<meta name=\"og:title\" ...>.This PR makes detection robust to both patterns by using CSS Level 4 case-insensitive value matching (
[attr=\"value\" i], supported by cheerio) and adding anameattribute fallback.Empirical reproducer
A real customer page (lululemon KSA) declares all 5 OG tags with
name=instead ofproperty=:Changes
Test plan
Related