From 78e23bd4ec426b61428c4aa4a89c0fc2f805d11d Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 21 Mar 2016 02:55:10 +0100 Subject: [PATCH] Fix issue #171 with latent htmLawed reference --- scripts/importtwitteratom.php | 8 +------- scripts/restoreuser.php | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/importtwitteratom.php b/scripts/importtwitteratom.php index 1a08dd7488..2a4cb7fc41 100755 --- a/scripts/importtwitteratom.php +++ b/scripts/importtwitteratom.php @@ -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'); diff --git a/scripts/restoreuser.php b/scripts/restoreuser.php index 17f007b412..6c287ad667 100644 --- a/scripts/restoreuser.php +++ b/scripts/restoreuser.php @@ -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()