Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I enter a node title of "Drupal's Code & Workflow" and try to share that node via twitter:
- then it generates the following URL: https://twitter.com/intent/tweet?url=http%3A%2F%2Fdrupal.org&text=Drupal...
- This appears in twitter as "Drupal's Code & Workflow !@#$%^&*()-+=[]{};'\|:"<>,.~ http://drupal.org"
It seems that social_share.theme:L148 calls rawurlencode which is double encoding text.
Recommend replacing
$replacements[$k] = rawurlencode($v);
with
$replacements[$k] = rawurlencode(decode_entities($v));
See attached patch.
Comment | File | Size | Author |
---|---|---|---|
social_share_double_encoding.patch | 947 bytes | adam.weingarten |
Comments
Comment #1
bryanbraun CreditAttribution: bryanbraun commentedI can confirm this issue, and and that the attached patch fixes it. :)
Comment #2
bryanbraun CreditAttribution: bryanbraun commentedComment #3
willvincent CreditAttribution: willvincent commentedPatch commit.