Skip to content

Commit

Permalink
Merge pull request #3142 from catchpoint/fix_email_share
Browse files Browse the repository at this point in the history
fix email share
  • Loading branch information
lbartoli79 authored Feb 6, 2025
2 parents ef772d0 + 1815432 commit 11eabb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/include/social_meta_vars.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_once __DIR__ . '/../common_lib.inc';
require_once __DIR__ . '/../common.inc';

$pageURI = urlencode('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
$pageURI = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
// NOTE: if you'd like a page to include a screenshot for social sharing, specify $useScreenshot = true above the head include.
// Also, for page-specific screenshot css tweaks, add a screenshot class to that page's body class
$screenshotURI = CreateUrlVariation($pageURI, "screenshot=1");
Expand All @@ -13,5 +13,5 @@ $socialImage = isset($useScreenshot) ? "https://wpt-screenshot.netlify.app/" . u
$socialTitle = isset($socialTitle) ? $socialTitle : "WebPageTest";
$socialDesc = isset($socialDesc) ? $socialDesc : "View this on WebPageTest.org...";
$emailSubject = "View this on WebPageTest!";
$tweetURI = 'https://twitter.com/intent/tweet?text=' . urlencode($socialDesc) . '&url=' . urlencode($pageURI) . '&via=realwebpagetest';
$emailURI = 'mailto:?subject=' . rawurlencode(htmlspecialchars_decode($emailSubject)) . '&body=' . rawurlencode(htmlspecialchars_decode($socialDesc) . ' %0D%0A ') . $pageURI;
$tweetURI = 'https://twitter.com/intent/tweet?text=' . urlencode($socialDesc) . '&url=' . $pageURI . '&via=realwebpagetest';
$emailURI = 'mailto:?subject=' . rawurlencode(htmlspecialchars_decode($emailSubject)) . '&body=' . rawurlencode(htmlspecialchars_decode($socialDesc) . " \n ") . $pageURI;

0 comments on commit 11eabb7

Please sign in to comment.