Close all void HTML tags and remove HTML entities

This commit is contained in:
Alex Cabal 2020-09-04 12:42:27 -05:00
parent dec516e3f1
commit 79ec73946e
13 changed files with 57 additions and 54 deletions

View file

@ -1,5 +1,5 @@
<aside class="alert">
<p>Is there an out-of-copyright book youd like to read, but that we dont have in our catalog?</p>
<p><a href="/contribute">Help us produce that ebook</a> so that others can read it in the future! Theres probably a basic transcription available at <a href="https://www.gutenberg.org">Project Gutenberg</a>&mdash;<a href="/contribute">get in touch with us</a> and well help you make it meet Standard Ebooks standards.</p>
<p><a href="/contribute">Help us produce that ebook</a> so that others can read it in the future! Theres probably a basic transcription available at <a href="https://www.gutenberg.org">Project Gutenberg</a><a href="/contribute">get in touch with us</a> and well help you make it meet Standard Ebooks standards.</p>
<p>Any skill level, from simple proofreading to complete ebook production, is welcome. Were here to help!</p>
</aside>

View file

@ -8,9 +8,9 @@ if(!isset($ebooks)){
<li>
<a href="<?= $ebook->Url ?>">
<picture>
<? if($ebook->CoverImage2xAvifUrl !== null){ ?><source srcset="<?= $ebook->CoverImage2xAvifUrl ?> 2x, <?= $ebook->CoverImageAvifUrl ?> 1x" type="image/avif"><? } ?>
<source srcset="<?= $ebook->CoverImage2xUrl ?> 2x, <?= $ebook->CoverImageUrl ?> 1x" type="image/jpg">
<img src="<?= $ebook->CoverImage2xUrl ?>" title="<?= Formatter::ToPlainText($ebook->Title) ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText(strip_tags($ebook->TitleWithCreditsHtml)) ?>" />
<? if($ebook->CoverImage2xAvifUrl !== null){ ?><source srcset="<?= $ebook->CoverImage2xAvifUrl ?> 2x, <?= $ebook->CoverImageAvifUrl ?> 1x" type="image/avif"/><? } ?>
<source srcset="<?= $ebook->CoverImage2xUrl ?> 2x, <?= $ebook->CoverImageUrl ?> 1x" type="image/jpg"/>
<img src="<?= $ebook->CoverImage2xUrl ?>" title="<?= Formatter::ToPlainText($ebook->Title) ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText(strip_tags($ebook->TitleWithCreditsHtml)) ?>"/>
</picture>
</a>
<p><a href="<?= $ebook->Url ?>"><?= Formatter::ToPlainText($ebook->Title) ?></a></p>

View file

@ -21,30 +21,30 @@ if(!isset($manual)){
?><!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta charset="utf-8"/>
<title><? if($title != ''){ ?><?= Formatter::ToPlainText($title) ?> - <? } ?>Standard Ebooks: Free and liberated ebooks, carefully produced for the true book lover.</title>
<? if($description != ''){ ?><meta content="<?= Formatter::ToPlainText($description) ?>" name="description"><? } ?>
<meta content="width=device-width, initial-scale=1" name="viewport">
<link href="/css/core.css?version=<?= crc32(file_get_contents(WEB_ROOT . '/css/core.css')) ?>" media="screen" rel="stylesheet" type="text/css">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<link href="/css/core.css?version=<?= crc32(file_get_contents(WEB_ROOT . '/css/core.css')) ?>" media="screen" rel="stylesheet" type="text/css"/>
<? if($manual){ ?>
<link href="/css/manual.css?version=<?= crc32(file_get_contents(WEB_ROOT . '/css/manual.css')) ?>" media="screen" rel="stylesheet" type="text/css">
<link href="/css/manual.css?version=<?= crc32(file_get_contents(WEB_ROOT . '/css/manual.css')) ?>" media="screen" rel="stylesheet" type="text/css"/>
<? } ?>
<link href="/apple-touch-icon-120x120.png" rel="apple-touch-icon" sizes="120x120">
<link href="/apple-touch-icon-152x152.png" rel="apple-touch-icon" sizes="152x152">
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
<link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
<link href="/manifest.json" rel="manifest">
<link rel="alternate" type="application/rss+xml" title="Standard Ebooks - New Releases" href="https://standardebooks.org/rss/new-releases">
<link color="#394451" href="/safari-pinned-tab.svg" rel="mask-icon">
<meta content="#394451" name="theme-color">
<meta content="<?= Formatter::ToPlainText($title) ?>" property="og:title">
<meta content="<?= $ogType ?? 'website' ?>" property="og:type">
<meta content="<?= SITE_URL . str_replace(SITE_URL, '', ($_SERVER['ORIG_PATH_INFO'] ?? $_SERVER['SCRIPT_URI'] ?? '')) ?>" property="og:url">
<meta content="<?= SITE_URL . ($coverUrl ?? '/images/logo.svg') ?>" property="og:image">
<meta content="summary_large_image" name="twitter:card">
<meta content="@standardebooks" name="twitter:site">
<meta content="@standardebooks" name="twitter:creator">
<link href="/apple-touch-icon-120x120.png" rel="apple-touch-icon" sizes="120x120"/>
<link href="/apple-touch-icon-152x152.png" rel="apple-touch-icon" sizes="152x152"/>
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180"/>
<link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/>
<link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/>
<link href="/manifest.json" rel="manifest"/>
<link rel="alternate" type="application/rss+xml" title="Standard Ebooks - New Releases" href="https://standardebooks.org/rss/new-releases"/>
<link color="#394451" href="/safari-pinned-tab.svg" rel="mask-icon"/>
<meta content="#394451" name="theme-color"/>
<meta content="<?= Formatter::ToPlainText($title) ?>" property="og:title"/>
<meta content="<?= $ogType ?? 'website' ?>" property="og:type"/>
<meta content="<?= SITE_URL . str_replace(SITE_URL, '', ($_SERVER['ORIG_PATH_INFO'] ?? $_SERVER['SCRIPT_URI'] ?? '')) ?>" property="og:url"/>
<meta content="<?= SITE_URL . ($coverUrl ?? '/images/logo.svg') ?>" property="og:image"/>
<meta content="summary_large_image" name="twitter:card"/>
<meta content="@standardebooks" name="twitter:site"/>
<meta content="@standardebooks" name="twitter:creator"/>
<? if(isset($jsonld)){ ?>
<script type="application/ld+json">
<?= $jsonld ?>

View file

@ -20,7 +20,7 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
<link href="/opds" rel="start" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
<link href="<?= $parentUrl ?>" rel="up" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
<link href="/opds/all" rel="http://opds-spec.org/crawlable" type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link href="/ebooks/opensearch" rel="search" type="application/opensearchdescription+xml" />
<link href="/ebooks/opensearch" rel="search" type="application/opensearchdescription+xml"/>
<title><?= htmlspecialchars($title, ENT_QUOTES|ENT_XML1, 'utf-8') ?></title>
<subtitle>Free and liberated ebooks, carefully produced for the true book lover.</subtitle>
<icon>/images/logo.png</icon>

View file

@ -14,7 +14,7 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
<link href="<?= $url ?>" rel="self" type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link href="/opds" rel="start" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
<link href="/opds/all" rel="http://opds-spec.org/crawlable" type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link href="/ebooks/opensearch" rel="search" type="application/opensearchdescription+xml" />
<link href="/ebooks/opensearch" rel="search" type="application/opensearchdescription+xml"/>
<? if($parentUrl !== null){ ?><link href="<?= $parentUrl ?>" rel="up" type="application/atom+xml;profile=opds-catalog;kind=navigation"/><? } ?>
<title><?= htmlspecialchars($title, ENT_QUOTES|ENT_XML1, 'utf-8') ?></title>
<subtitle>Free and liberated ebooks, carefully produced for the true book lover.</subtitle>

View file

@ -1,5 +1,3 @@
<form action="/ebooks" method="get">
<label class="search">
Search ebooks: <input type="search" name="query" placeholder="Search all ebooks..." value="<?= Formatter::ToPlainText($query ?? '') ?>" />
</label>
<label class="search">Search ebooks: <input type="search" name="query" placeholder="Search all ebooks..." value="<?= Formatter::ToPlainText($query ?? '') ?>"/></label>
</form>