summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-12-28 22:52:00 +0100
committermsquare <msquare@notrademark.de>2018-12-28 23:08:39 +0100
commit1bb2c57842373036a63036cc834e21f5838b7bd3 (patch)
tree680372323af2ce10ad40d9ea802f56e0489dd8a0 /includes/pages
parent6df3dc8489ac4105e2a8e41899227991537489e2 (diff)
comments: Don't strip characters
closes #510 (htmlentities-like content in a comment gets removed)
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/user_news.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php
index 34be033f..29aff5ca 100644
--- a/includes/pages/user_news.php
+++ b/includes/pages/user_news.php
@@ -143,11 +143,7 @@ function user_news_comments()
$nid = $request->input('nid');
$news = DB::selectOne('SELECT * FROM `News` WHERE `ID`=? LIMIT 1', [$nid]);
if ($request->hasPostData('submit') && $request->has('text')) {
- $text = preg_replace(
- "/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui",
- '',
- strip_tags($request->input('text'))
- );
+ $text = $request->input('text');
DB::insert('
INSERT INTO `NewsComments` (`Refid`, `Datum`, `Text`, `UID`)
VALUES (?, ?, ?, ?)
@@ -159,7 +155,8 @@ function user_news_comments()
$user->id,
]
);
- engelsystem_log('Created news_comment: ' . $text);
+
+ engelsystem_log('Created news_comment: ' . htmlspecialchars($text));
$html .= success(__('Entry saved.'), true);
}
@@ -227,6 +224,7 @@ function user_news()
$isMeeting,
]
);
+
engelsystem_log('Created news: ' . $request->postData('betreff') . ', treffen: ' . $isMeeting);
success(__('Entry saved.'));
redirect(page_link_to('news'));