diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e0bfb90..e2372b9 100755
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -20,8 +20,9 @@
-
+
+
@@ -33,7 +34,7 @@
-
+
@@ -79,7 +80,7 @@
1601618466935
-
+
1601618764031
@@ -242,7 +243,14 @@
1601836166244
-
+
+ 1601836234258
+
+
+
+ 1601836234258
+
+
@@ -281,7 +289,8 @@
-
+
+
@@ -328,13 +337,17 @@
-
+
-
-
+
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/model/FaqModel.class.inc.php b/model/FaqModel.class.inc.php
index 46d8c4f..5fbd7b4 100644
--- a/model/FaqModel.class.inc.php
+++ b/model/FaqModel.class.inc.php
@@ -83,14 +83,14 @@ class FaqModel
public function addQuestion(int $room_id, string $question, string $nickname )
{
$stmnt = Database::getConnection()->prepare( 'INSERT INTO questions ( room_id, question, created_by ) VALUES ( :room_id, :question, :created_by )' );
- $stmnt->execute( array( 'room_id' => $room_id, 'question' => htmlspecialchars( $question ), 'created_by' => $nickname ) );
+ $stmnt->execute( array( 'room_id' => $room_id, 'question' => htmlspecialchars($question, ENT_QUOTES, 'UTF-8'), 'created_by' => $nickname ) );
}
public function addAnswer(int $question_id, string $answer)
{
$stmnt = Database::getConnection()->prepare( 'UPDATE questions SET answer = :answer WHERE id = :id' );
- $stmnt->execute( array( 'answer' => htmlspecialchars( $answer ), 'id' => $question_id ) );
+ $stmnt->execute( array( 'answer' => htmlspecialchars($answer, ENT_QUOTES, 'UTF-8'), 'id' => $question_id ) );
}
@@ -123,7 +123,7 @@ class FaqModel
{
return false;
}
- $result['question'] = str_replace( "\n", '
', $result['question'] );
+
return $result;
}
}
\ No newline at end of file
diff --git a/templates/faq.tmpl.html b/templates/faq.tmpl.html
index ab3536b..7d5e972 100755
--- a/templates/faq.tmpl.html
+++ b/templates/faq.tmpl.html
@@ -141,7 +141,7 @@
- Loading...
+ Loading...