From: garvinhicking Date: Mon, 15 Aug 2005 12:25:59 +0000 (+0000) Subject: Plugin commit by Christian Boltz: Show inline links/images X-Git-Tag: 0.9~209 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7e4d13224c08771e658e65794a7a97a53f5d867c;p=s9y.git Plugin commit by Christian Boltz: Show inline links/images when stripping tags. --- diff --git a/plugins/serendipity_event_mailer/serendipity_event_mailer.php b/plugins/serendipity_event_mailer/serendipity_event_mailer.php index 6682871..464e5fd 100644 --- a/plugins/serendipity_event_mailer/serendipity_event_mailer.php +++ b/plugins/serendipity_event_mailer/serendipity_event_mailer.php @@ -29,7 +29,7 @@ class serendipity_event_mailer extends serendipity_event $propbag->add('description', PLUGIN_EVENT_MAILER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Sebastian Nohn, Kristian Köhntopp, Garvin Hicking'); - $propbag->add('version', '1.2'); + $propbag->add('version', '1.3'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -106,6 +106,8 @@ class serendipity_event_mailer extends serendipity_event } if (serendipity_db_bool($this->get_config('striptags', false)) == true) { + $mail['body'] = preg_replace('§]+href=["\']([^"\']*)["\'][^>]*>([^<]*)§i', "$2 [$1]", $mail['body']); + $mail['body'] = preg_replace('§]+src=["\']([^"\']*)["\'][^>]*>§i', "[" . IMAGE . ": $1]", $mail['body']); $mail['body'] = strip_tags($mail['body']); }