]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix issue #171 with latent htmLawed reference
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Mar 2016 01:55:10 +0000 (02:55 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Mar 2016 01:55:10 +0000 (02:55 +0100)
scripts/importtwitteratom.php
scripts/restoreuser.php

index 1a08dd7488d867d284b7cf5ee0096254340d2550..2a4cb7fc41f2f0950ac69e5587b30c4e51c048b5 100755 (executable)
@@ -34,7 +34,6 @@ import an Atom feed from Twitter as notices by a user
 END_OF_IMPORTTWITTERATOM_HELP;
 
 require_once INSTALLDIR.'/scripts/commandline.inc';
-require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
 
 function getAtomFeedDocument()
 {
@@ -82,12 +81,7 @@ function importActivityStream($user, $doc)
         if (!have_option('q', 'quiet')) {
             print $activity->content . "\n";
         }
-        $html = getTweetHtml($object->link);
-
-        $config = array('safe' => 1,
-                        'deny_attribute' => 'class,rel,id,style,on*');
-
-        $html = htmLawed($html, $config);
+        $html = common_purify(getTweetHtml($object->link));
 
         $content = html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8');
 
index 17f007b41206406c36d13e6711f7bda7d8535d71..6c287ad66784d8dc80c782ac4d782ada6fb03a1a 100644 (file)
@@ -34,7 +34,6 @@ neither ID or name provided, will create a new user.
 END_OF_RESTOREUSER_HELP;
 
 require_once INSTALLDIR.'/scripts/commandline.inc';
-require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
 
 
 function getActivityStreamDocument()