]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/sitenoticeadminpanel.php
Handle selfLink in ActivityObject
[quix0rs-gnu-social.git] / actions / sitenoticeadminpanel.php
index b1ac441af7f74e75c76c060360e23f181e37d7a4..72c9f9a1289486fde08783bc69e4e52c116d7250 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
@@ -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,7 +189,7 @@ class SiteNoticeAdminPanelForm extends AdminForm
             _m('BUTTON','Save'),
             'submit',
             null,
-            // TRANS: Title for button to save site notice in admin panel.
+            // TRANS: Button title to save site notice in admin panel.
             _('Save site notice.')
         );
     }