Issue Bug Closed

#68423Use parse_url to determine fully qualified urls in ImageService

Frans Saris 07/21/15, 13:47 updated 10/02/18, 11:35

Description

In de ImageService strpos($imageUrl, '://') is used to check if the url is already a absolute url. But because in HTML context/output the schema isn’t needed for images this check will fail for //www.my-domain.com/image.jpg.

To also support only // we should use parse_url($imageUrl, PHP_URL_HOST) !== NULL to check if it is an absolute url.

Reviews 2