fixes for site back up and mailer, turned on md list rendering

pull/84/head
Ro 3 years ago
parent 8ad3fa38c5
commit a70c98afa0

@ -12,6 +12,7 @@ use League\CommonMark\MarkdownConverter;
use League\CommonMark\CommonMarkConverter;
use HtmlSanitizer\Extension\Basic\BasicExtension;
use HtmlSanitizer\Extension\Iframe\IframeExtension;
use HtmlSanitizer\Extension\Listing\ListExtension;
use HtmlSanitizer\SanitizerBuilder;
use function _\orderBy;
@ -70,10 +71,11 @@ class Contents
->parse(file_get_contents($file));
//never trust the front end. clean it up
//add what sanitizer extensions we need manually
$builder = new SanitizerBuilder();
$builder->registerExtension(new BasicExtension());
$builder->registerExtension(new IframeExtension());
$builder->registerExtension(new ListExtension());
//relative-a and relative-image
$builder->registerExtension(
@ -84,7 +86,7 @@ class Contents
);
$detergent = [
"extensions" => ["basic", "relative-a", "relative-image", "iframe"],
"extensions" => ["basic", "list","relative-a", "relative-image", "iframe"],
"tags" => [
"div" => [
"allowed_attributes" => ["class", "title", "id", "style"],

@ -6,6 +6,7 @@ use Slim\Views\Twig;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use brain\data\Settings;
use brain\data\Session;
class Mailer
{

@ -17,10 +17,10 @@ class Maintenance
mkdir("../config/backups", 0755, true);
}
//creat backup zip
$zip = new ZipArchive();
$zip = new \ZipArchive();
$zip->open(
"../config/backups/latest_back.zip",
ZipArchive::CREATE | ZipArchive::OVERWRITE
\ZipArchive::CREATE | \ZipArchive::OVERWRITE
);
//gather data and path info for md pages
$pagePath = "../content/pages";

Loading…
Cancel
Save