Commit eafdd4e8 authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

Modify sharer_url, change & by & and spaces by %20, to be consistent with w3c.

Ref: #79846
parent b4c5b741
......@@ -93,4 +93,7 @@ function _sharer_toolbar_generate_sharer_url(&$sharer_url, $variables) {
$truncate_summary = truncate_utf8(drupal_html_to_text($summary), 200, TRUE, $add_ellipsis = TRUE);
}
$sharer_url = str_replace('[:shared_summary:]', $truncate_summary, $sharer_url);
// Replace spaces by %20 to be consistent with w3c
$sharer_url = str_replace(' ', '%20', $sharer_url);
}
......@@ -104,7 +104,7 @@ function sharer_toolbar_sharer_toolbar_available_sharer() {
'sid' => 'linkedin',
'name' => 'LinkedIn',
'icon_class' => 'icon-linkedin',
'url' => 'https://www.linkedin.com/shareArticle?mini=true&url=[:shared_url:]&title=[:shared_title:]&summary=[:shared_summary:]&source=[:shared_source:]',
'url' => 'https://www.linkedin.com/shareArticle?mini=true&url=[:shared_url:]&title=[:shared_title:]&summary=[:shared_summary:]&source=[:shared_source:]',
'label' => 'Share on LinkedIn',
),
......@@ -113,7 +113,7 @@ function sharer_toolbar_sharer_toolbar_available_sharer() {
'sid' => 'email',
'name' => 'Email',
'icon_class' => 'icon-email',
'url' => 'mailto:?subject=[:shared_title:]&body=[:shared_url:]',
'url' => 'mailto:?subject=[:shared_title:]&body=[:shared_url:]',
'label' => 'Share by email',
),
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment