]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/sitenoticeadminpanel.php
Merge branch 'genericons-fix' into 'nightly'
[quix0rs-gnu-social.git] / actions / sitenoticeadminpanel.php
index 797a6c4f4cfdeb1649c360e96c3cb580432aab7b..a0a8b03b64ed7c77a830afe99cfeafea25e7356c 100644 (file)
  * @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,7 @@ class SitenoticeadminpanelAction extends AdminPanelAction
         }
 
         // scrub HTML input
-
-        $config = array(
-            'safe' => 1,
-            'deny_attribute' => 'id,style,on*'
-        );
-
-        $siteNotice = htmLawed($siteNotice, $config);
+        $siteNotice = common_purify($siteNotice);
     }
 }
 
@@ -197,8 +187,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.')
         );
     }
 }