Replace Summernote WYSIWYG with TinyMCE

This commit is contained in:
johnnyq
2023-05-08 18:44:00 -04:00
parent 018f52eb67
commit 01a37cb1e1
80 changed files with 3464 additions and 69 deletions

View File

@@ -1,6 +1,12 @@
<?php require_once("inc_all_client.php"); ?>
<?php
<?php
require_once("inc_all_client.php");
//Initialize the HTML Purifier to prevent XSS
require("plugins/htmlpurifier/HTMLPurifier.standalone.php");
$purifier_config = HTMLPurifier_Config::createDefault();
$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]);
$purifier = new HTMLPurifier($purifier_config);
// Sort by
if (!empty($_GET['sb'])) {
@@ -81,7 +87,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
while ($row = mysqli_fetch_array($sql)) {
$document_id = intval($row['document_id']);
$document_name = htmlentities($row['document_name']);
$document_content = htmlentities($row['document_content']);
//$document_content = $purifier->purify($row['document_content']);
$document_content = $row['document_content'];
$document_created_at = htmlentities($row['document_created_at']);
$document_updated_at = htmlentities($row['document_updated_at']);
$document_folder_id = intval($row['document_folder_id']);