Bug 206382 - Ensure full URLs for relative path images for social meta data
Summary: Ensure full URLs for relative path images for social meta data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jon Davis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-16 15:57 PST by Jon Davis
Modified: 2020-01-16 17:31 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.41 KB, patch)
2020-01-16 16:02 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Patch (1.27 KB, patch)
2020-01-16 16:42 PST, Jon Davis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Davis 2020-01-16 15:57:38 PST
Posts and pages that specify relative paths for images will not be properly propagated in open graph meta data.
Comment 1 Jon Davis 2020-01-16 16:02:18 PST
Created attachment 387976 [details]
Patch
Comment 2 Devin Rousso 2020-01-16 16:33:04 PST
Comment on attachment 387976 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=387976&action=review

r=me, with a few comments

> Websites/webkit.org/wp-content/plugins/social-meta.php:84
> +        if ($image_url[0] === '/')

Should we move this logic to the end of the initial `<?php` block at the top of this file?  That way, if HTML tags are added for other social platforms above this, they won't "miss" this logic.

> Websites/webkit.org/wp-content/plugins/social-meta.php:85
> +            $image_url = get_home_url(null,$image_url);

Style: should have space between `null, $image_url`.
Comment 3 Jon Davis 2020-01-16 16:42:38 PST
Created attachment 387986 [details]
Patch
Comment 4 WebKit Commit Bot 2020-01-16 17:30:10 PST
Comment on attachment 387986 [details]
Patch

Clearing flags on attachment: 387986

Committed r254731: <https://trac.webkit.org/changeset/254731>
Comment 5 WebKit Commit Bot 2020-01-16 17:30:11 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-01-16 17:31:28 PST
<rdar://problem/58665624>