From bdcbdaf2e00fcb33fa42c2642eda4a724fd85acc Mon Sep 17 00:00:00 2001
From: bx khateri <bx@bxs-MacBook-Pro.local>
Date: Thu, 23 Nov 2023 15:53:38 +0100
Subject: [PATCH] html special

---
 twits.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/twits.php b/twits.php
index ec31f8d..0516773 100644
--- a/twits.php
+++ b/twits.php
@@ -24,14 +24,14 @@ $post_url_image = null;
 
 
 if (isset($_POST['post_title'])) {
-    $post_title = $_POST['post_title'];
+    $post_title = htmlspecialchars($_POST['post_title']);
 }
 if ($post_title == null) {
     $errors = 'post title must be present';
 }
 
 if (isset($_POST['post_body'])) {
-    $post_body = $_POST['post_body'];
+    $post_body = htmlspecialchars($_POST['post_body']);
 }
 if ($post_body == null) {
     $errors = 'post body must be present';
@@ -49,7 +49,7 @@ if (isset($postImageName)) {
 }
 
 if (isset($_POST['post_url_image'])) {
-    $post_url_image = $_POST['post_url_image'];
+    $post_url_image = htmlspecialchars($_POST['post_url_image']);
 }
 
 
-- 
GitLab