Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v:resource.image does not respect fully qualified uri's #865

Closed
mischka opened this issue Jul 22, 2015 · 0 comments
Closed

v:resource.image does not respect fully qualified uri's #865

mischka opened this issue Jul 22, 2015 · 0 comments

Comments

@mischka
Copy link
Contributor

mischka commented Jul 22, 2015

I use http://typo3.org/extensions/repository/view/aus_driver_local_cdn as File Storege Driver.
So the image uri is http://cdn.mydomain.tld/my-image.jpg but the ImageViewHelper encodes the uri so my image.source is http%3A//cdn.mydomain.tld/my-image.jpg . The problem is in the preprocessImages and the preprocessSourceUri-method in the FluidTYPO3\Vhs\ViewHelpers\Resource\AbstractImageViewHelper, there is no check for a fully qualified uri

$imageSource = $GLOBALS['TSFE']->absRefPrefix . GeneralUtility::rawUrlEncodeFP($imageInfo[3]);

to

if(GeneralUtility::isValidUrl($imageInfo[3])) {
    $imageSource = $imageInfo[3];
} else {
    $imageSource = $GLOBALS['TSFE']->absRefPrefix . GeneralUtility::rawUrlEncodeFP($imageInfo[3]);
}
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

No branches or pull requests

1 participant