Skip to content

Commit

Permalink
🐛 fix double escaping of featured images
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Feb 7, 2024
1 parent d426639 commit 83c8974
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions site/LongFormPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ export const LongFormPage = (props: {
pageDesc={pageDesc}
canonicalUrl={canonicalUrl}
imageUrl={
post.imageUrl
? encodeURI(formatUrls(post.imageUrl))
: undefined
// uriEncoding is taken care of inside the Head component
post.imageUrl ? formatUrls(post.imageUrl) : undefined
}
baseUrl={baseUrl}
>
Expand Down
5 changes: 2 additions & 3 deletions site/gdocs/OwidGdocPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ export default function OwidGdocPage({
pageDesc={pageDesc}
canonicalUrl={canonicalUrl}
imageUrl={
// uriEncoding is taken care of inside the Head component
featuredImageFilename
? encodeURI(
filenameToUrl(featuredImageFilename, baseUrl)
)
? filenameToUrl(featuredImageFilename, baseUrl)
: undefined
}
baseUrl={baseUrl}
Expand Down

0 comments on commit 83c8974

Please sign in to comment.