Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292537

FieldPluginBase::renderAsLink() should consider protocol-relative URL as external

$
0
0

Problem/Motivation

When using the Views UI to rewrite a field as a link and using a protocol-relative URL (the ones that start with "//"), it is considered as an internal URL and prefixed by "internal:/". This triggers the Core PathValidator that calls the PathProcessorManager::processInbound which can cause a lot of problems. In my case, file URL served by the CDN module become unusable due to their transformation that's not supposed to happen on display.

Proposed resolution

Use \Drupal\Component\Utility\UrlHelper::isExternal() to prevent this from happening.


Viewing all articles
Browse latest Browse all 292537

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>