Signed-off-by: Abijeet <redacted>
$scriptSearchRegex = '/<script.*?>.*?<\/script>/ms';
$matches = [];
preg_match_all($scriptSearchRegex, $html, $matches);
- if (count($matches) === 0) return $html;
+ if (count($matches) === 0) {
+ return $html;
+ }
foreach ($matches[0] as $match) {
$html = str_replace($match, htmlentities($match), $html);
* @param Image $image
* @return boolean
*/
- protected function isGif(Image $image) {
+ protected function isGif(Image $image)
+ {
return strtolower(pathinfo($this->getPath($image), PATHINFO_EXTENSION)) === 'gif';
}