Bug 206382

Summary: Ensure full URLs for relative path images for social meta data
Product: WebKit Reporter: Jon Davis <jond>
Component: WebKit WebsiteAssignee: Jon Davis <jond>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, jond, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>