X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsitenoticeadminpanel.php;h=72c9f9a1289486fde08783bc69e4e52c116d7250;hb=7da925ca70c74c3466fd0477403109ed40d02175;hp=797a6c4f4cfdeb1649c360e96c3cb580432aab7b;hpb=65eeb7cba530e45b8d8a25644505619e8af63971;p=quix0rs-gnu-social.git diff --git a/actions/sitenoticeadminpanel.php b/actions/sitenoticeadminpanel.php index 797a6c4f4c..72c9f9a128 100644 --- a/actions/sitenoticeadminpanel.php +++ b/actions/sitenoticeadminpanel.php @@ -27,11 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} - -require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * Update the site-wide notice text @@ -98,7 +94,7 @@ class SitenoticeadminpanelAction extends AdminPanelAction if (!$result) { // TRANS: Server error displayed when saving a site-wide notice was impossible. - $this->ServerError(_("Unable to save site notice.")); + $this->ServerError(_('Unable to save site notice.')); } } @@ -114,13 +110,9 @@ class SitenoticeadminpanelAction extends AdminPanelAction } // scrub HTML input - - $config = array( - 'safe' => 1, - 'deny_attribute' => 'id,style,on*' - ); - - $siteNotice = htmLawed($siteNotice, $config); + require_once INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php'; + $purifier = new HTMLPurifier(); + $siteNotice = $purifier->purify($siteNotice); } } @@ -197,8 +189,8 @@ class SiteNoticeAdminPanelForm extends AdminForm _m('BUTTON','Save'), 'submit', null, - // TRANS: Title for button to save site notice in admin panel. - _('Save site notice') + // TRANS: Button title to save site notice in admin panel. + _('Save site notice.') ); } }