-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta tags with same name
attribute but different other attributes will be overwritten
#34
Comments
This fix broke my website's open graph meta tags. I had a top level set of meta tags with default, e.g. <Meta name="og:image" property="og:image" content="default.png" /> And I used child meta tags to override it, e.g. <Meta name="og:image" property="og:image" content="actual-image.png" /> It worked fine. However, due to this change, it now doesn't override the tag, and both are shown at the same time, causing tools reading the open graph tags to use the first one and not the correct one. This is because the key now is different for both: // first key
'meta{"content":"default.png","name":"og:image"}'
// second key
'meta{"content":"actual-image.png","name":"og:image"}' |
@DaniGuardiola Sorry for breaking existing features while fixing this issue. |
@GoodbyeNJN it's okay, shit happens :) See #39 - I think the cascading/overriding effect should just be completely explicit and opt-in because the heuristics get too complicated otherwise. |
For example, use the following two tags:
Only the latter will actually be rendered.
The problem lies here:
solid-meta/src/index.tsx
Lines 156 to 170 in c9d21ef
This function seems to remove duplicate tags, but only
name
orproperty
attributes are compared when checking whether they are duplicates.I suppose to sort
props
by key and then serialize it as the unique key of a tag for comparison.The text was updated successfully, but these errors were encountered: