Skip to content

Conversation

@alt36
Copy link

@alt36 alt36 commented May 12, 2020

This follows the code in theme_link_formatter_link_plain() from
link.module. When the raw internal 'url' property is simply
printed, it leads to any query parameters being stripped (and I'm
assuming e.g. that URL fragments are similarly missed off) because
of the internals of how Link sanitizes URLs.

This e.g. makes it impossible to have a carousel item linking to
a YouTube video.

NB I don't directly use the cambridge_carousel module, instead using a similar module for local purposes. However, this PR is a straight copy/paste from the change I've just deployed to my module (https://gitlab.developers.cam.ac.uk/ch/co/drupal-chem/chemistry_slideshow/-/commit/31fc72621907bac460380aeb1253b8819778f3fe)

This follows the code in theme_link_formatter_link_plain() from
link.module. When the raw internal 'url' property is simply
printed, it leads to any query parameters being stripped (and I'm
assuming e.g. that URL fragments are similarly missed off) because
of the internals of how Link sanitizes URLs.

This e.g. makes it impossible to have a carousel item linking to
a YouTube video.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant