Skip to content

Double quotes in desc break gallery  #5

@t-book

Description

@t-book

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions