From 89d0b2ea46edd976840607432ce6d77d625d3ce2 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 13 Dec 2024 12:24:29 -0600 Subject: [PATCH] =?UTF-8?q?Replace=20'=20with=20=E2=80=99=20in=20placehold?= =?UTF-8?q?er=20titles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Ebook.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Ebook.php b/lib/Ebook.php index 4cf7dec0..3b30bedd 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -1190,6 +1190,9 @@ class Ebook{ $error->Add(new Exceptions\EbookTitleRequiredException()); } + // Sometimes placeholders may have `'` in the title. + $this->Title = str_replace('\'', '’', $this->Title); + if(strlen($this->Title) > EBOOKS_MAX_STRING_LENGTH){ $error->Add(new Exceptions\StringTooLongException('Ebook Title')); }