Skip to content

Commit 15941fb

Browse files
authored
Merge pull request #36 from editor-js/2.0.5
2.0.5
2 parents 36de3db + 330ee3d commit 15941fb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

EditorJS/BlockHandler.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,12 @@ private function getDefaultPurifier()
258258
$sanitizer->set('AutoFormat.RemoveEmpty', true);
259259
$sanitizer->set('HTML.DefinitionID', 'html5-definitions');
260260

261-
if (!is_dir('/tmp/purifier')) {
262-
mkdir('/tmp/purifier', 0777, true);
261+
$cacheDirectory = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'purifier';
262+
if (!is_dir($cacheDirectory)) {
263+
mkdir($cacheDirectory, 0777, true);
263264
}
264265

265-
$sanitizer->set('Cache.SerializerPath', '/tmp/purifier');
266+
$sanitizer->set('Cache.SerializerPath', $cacheDirectory);
266267

267268
return $sanitizer;
268269
}

0 commit comments

Comments
 (0)