From ecd58559908a52438502d4189abcc3d0fb101e47 Mon Sep 17 00:00:00 2001 From: frankdelange Date: Sun, 7 Feb 2016 14:47:43 +0100 Subject: [PATCH] files_opds: who on earth writes overlong copyright statements in metadata? Cap it to 256 characters... --- files_opds/appinfo/info.xml | 2 +- files_opds/lib/meta.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files_opds/appinfo/info.xml b/files_opds/appinfo/info.xml index a962b56..9cad661 100644 --- a/files_opds/appinfo/info.xml +++ b/files_opds/appinfo/info.xml @@ -10,7 +10,7 @@ The feed is in compliance with the OPDS 1.1 specification according to the online OPDS validator (http://opds-validator.appspot.com/). AGPL - 0.6.11 + 0.6.12 Frank de Lange 8.1 false diff --git a/files_opds/lib/meta.php b/files_opds/lib/meta.php index dca7dd5..c808d48 100644 --- a/files_opds/lib/meta.php +++ b/files_opds/lib/meta.php @@ -92,7 +92,7 @@ class Meta $meta['language'], $meta['publisher'], preg_replace('/[^0-9xX]/','',$meta['isbn']), - $meta['copyright'], + mb_strimwidth($meta['copyright'],0,252,'...'), mb_strimwidth($meta['description'],0,2044,'...'), $meta['subjects'], $meta['cover'], @@ -111,7 +111,7 @@ class Meta $meta['language'], $meta['publisher'], preg_replace('/[^0-9xX]/','',$meta['isbn']), - $meta['copyright'], + mb_strimwidth($meta['copyright'],0,252,'...'), mb_strimwidth($meta['description'],0,2044,'...'), $meta['subjects'], $meta['cover'],