mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add cover art database
Co-authored-by: Job Curtis <job.curtis@gmail.com> Co-authored-by: Alex Cabal <alex@standardebooks.org>
This commit is contained in:
parent
74f747df76
commit
6a5c05511a
92 changed files with 3174 additions and 146 deletions
|
@ -40,6 +40,12 @@ class Formatter{
|
|||
return htmlspecialchars(trim($text ?? ''), ENT_QUOTES|ENT_XML1, 'utf-8');
|
||||
}
|
||||
|
||||
public static function EscapeMarkdown(?string $text): string{
|
||||
$parsedown = new Parsedown();
|
||||
$parsedown->setSafeMode(true);
|
||||
return $parsedown->text($text);
|
||||
}
|
||||
|
||||
public static function ToFileSize(?int $bytes): string{
|
||||
// See https://stackoverflow.com/a/5501447
|
||||
$output = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue