From 6953090e7d789f52761a8f4b505cfbcf0c347018 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 26 Dec 2017 14:35:01 +0100 Subject: 392: Show warning message when editing html news without proper permissions to save them, Closes #392 --- includes/pages/admin_news.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'includes/pages/admin_news.php') diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php index eb3a250e..7f912773 100644 --- a/includes/pages/admin_news.php +++ b/includes/pages/admin_news.php @@ -29,6 +29,15 @@ function admin_news() switch ($request->input('action')) { case 'edit': $user_source = User($news['UID']); + if ( + !in_array('admin_news_html', $privileges) + && strip_tags($news['Text']) != $news['Text'] + ) { + $html .= warning( + _('This message contains HTML. After saving the post some formatting will be lost!'), + true + ); + } $html .= form( [ -- cgit v1.2.3-54-g00ecf