diff --git a/Makefile b/Makefile index 6d0bb59ee7..52f1317967 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ clean_assets: config: @php bin/console compile:configuration + @php bin/developer orm:generate-proxies watch: @echo 'config/configuration.yml' | entr make config diff --git a/lib/classes/media/Permalink/Adapter.php b/lib/classes/media/Permalink/Adapter.php index d489963066..26901ac1d8 100644 --- a/lib/classes/media/Permalink/Adapter.php +++ b/lib/classes/media/Permalink/Adapter.php @@ -39,6 +39,12 @@ class media_Permalink_Adapter implements cache_cacheableInterface /** @var Application */ protected $app; + private static $bad_chars = [ + "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", + "\x08", "\x09", "\x0A", "\x0B", "\x0C", "\x0D", "\x0E", "\x0F", + " ", "/", "\\", "%", "+" + ]; + /** * @param Application $app * @param databox $databox @@ -118,7 +124,7 @@ class media_Permalink_Adapter implements cache_cacheableInterface 'record_id' => $this->media_subdef->get_record_id(), 'subdef' => $this->media_subdef->get_name(), /** @Ignore */ - 'label' => str_replace('/', '_', $label), + 'label' => str_replace(self::$bad_chars, '_', $label), 'token' => $this->get_token(), ])); }