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

Double quotes in desc break gallery #5

Open
t-book opened this issue Oct 2, 2019 · 0 comments
Open

Double quotes in desc break gallery #5

t-book opened this issue Oct 2, 2019 · 0 comments

Comments

@t-book
Copy link

t-book commented Oct 2, 2019

Hi,

can we add specialchars to the imageData to catch double quotes in image descriptions?

    /**
     * prepareImageData
     * 
     * helper to prepare all data for image template
     * 
     * @param PageImage $image
     * @param array $options
     * @return array
     */
    protected function prepareImageData(WireData $image, $options = []) {

        $imageData = $image->getArray();
        $imageData['url'] = $image->url;
        $imageData['width'] = $image->width;
        $imageData['height'] = $image->height;
        $imageData['alt'] = $imageData['alt'] ?: htmlspecialchars($imageData['description']);

        $imageData['thumbImage'] = $this->resizeImage($image, $options['imageResizerOptions']);
        $imageData['loresImage'] = $this->resizeImage($image, $options['loresResizerOptions']);
        return $imageData;
    }
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