Add summernote WYSIWYG function to Raising a ticket as we sanitize outout with HTMLPurify

This commit is contained in:
johnnyq 2023-03-13 20:06:36 -04:00
parent 748041cd5d
commit 37e21e963b
2 changed files with 1 additions and 5 deletions

View File

@ -44,10 +44,6 @@ if (isset($_POST['add_ticket'])) {
if (isset($_POST['add_ticket_comment'])) {
$ticket_id = intval($_POST['ticket_id']);
// Not currently providing the client portal with a full summer note editor, but need to maintain line breaks.
// In order to maintain line breaks consistently with the agent side, we need to allow HTML tags.
// So, we need to convert line breaks to HTML and clean HTML with HTML Purifier
$comment = mysqli_real_escape_string($mysqli, $_POST['comment']);
// After stripping bad HTML, check the comment isn't just empty

View File

@ -48,7 +48,7 @@ require_once('inc_portal.php');
<div class="form-group">
<label>Details <strong class="text-danger">*</strong></label>
<textarea class="form-control" rows="4" name="details" required></textarea>
<textarea class="form-control summernote" name="details" required></textarea>
</div>
<button class="btn btn-primary" name="add_ticket">Raise ticket</button>