mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
PSR2 fixes after running ./vendor/bin/phpcbf
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
parent
a8f18c0102
commit
2fc513984d
@ -201,5 +201,4 @@ class Entity extends Ownable
|
|||||||
{
|
{
|
||||||
return '/';
|
return '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -774,7 +774,9 @@ class EntityRepo
|
|||||||
$scriptSearchRegex = '/<script.*?>.*?<\/script>/ms';
|
$scriptSearchRegex = '/<script.*?>.*?<\/script>/ms';
|
||||||
$matches = [];
|
$matches = [];
|
||||||
preg_match_all($scriptSearchRegex, $html, $matches);
|
preg_match_all($scriptSearchRegex, $html, $matches);
|
||||||
if (count($matches) === 0) return $html;
|
if (count($matches) === 0) {
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($matches[0] as $match) {
|
foreach ($matches[0] as $match) {
|
||||||
$html = str_replace($match, htmlentities($match), $html);
|
$html = str_replace($match, htmlentities($match), $html);
|
||||||
|
@ -192,7 +192,8 @@ class ImageService extends UploadService
|
|||||||
* @param Image $image
|
* @param Image $image
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
protected function isGif(Image $image) {
|
protected function isGif(Image $image)
|
||||||
|
{
|
||||||
return strtolower(pathinfo($this->getPath($image), PATHINFO_EXTENSION)) === 'gif';
|
return strtolower(pathinfo($this->getPath($image), PATHINFO_EXTENSION)) === 'gif';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user