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.
The convertUrlToAbsolute()
function doesn't properly detect when the urls are protocol relative (ie. starts with //) and instead thinks that they are relative urls instead. This leads to corrupted urls in the meta tags.
Attached is a patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | metatag-n2791963-4.patch | 2.4 KB | DamienMcKenna |
| |||
metatag-protocol-relative.patch | 618 bytes | ttkaminski | |
|
Comments
Comment #2
ttkaminski CreditAttribution: ttkaminski commentedComment #3
DamienMcKennaNeed some tests to confirm the behavior.
Comment #4
DamienMcKennaMinor tidying of the code, plus updated the comment. And a test.
Comment #6
DamienMcKennaCommitted. Thanks.
Comment #8
Wim LeersSimilar bug in D8 now: #2840751: Protocol-relative URLs are broken.