From 102b6c2df377759de8b17f3fe6fa7366fb7385dd Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Tue, 28 Apr 2015 02:40:33 +0200 Subject: [PATCH] [ticket/10922] Added support for body and subject in email BBCode PHPBB3-10922 --- phpBB/phpbb/textformatter/s9e/factory.php | 15 +++++++++++++-- .../tickets_data/PHPBB3-10922.html | 4 +++- .../text_processing/tickets_data/PHPBB3-10922.txt | 4 +++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 9576abe1f0..a1bd43e40e 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -68,7 +68,7 @@ class factory implements \phpbb\textformatter\cache_interface 'b' => '[B]{TEXT}[/B]', 'code' => '[CODE]{TEXT}[/CODE]', 'color' => '[COLOR={COLOR}]{TEXT}[/COLOR]', - 'email' => '[EMAIL={EMAIL;useContent}]{TEXT}[/EMAIL]', + 'email' => '[EMAIL={EMAIL;useContent} subject={TEXT;optional;postFilter=urlencode} body={TEXT;optional;postFilter=urlencode}]{TEXT}[/EMAIL]', 'flash' => '[FLASH={NUMBER1},{NUMBER2} width={NUMBER1;postFilter=#flashwidth} height={NUMBER2;postFilter=#flashheight} url={URL;useContent} /]', 'i' => '[I]{TEXT}[/I]', 'img' => '[IMG src={IMAGEURL;useContent}]', @@ -97,7 +97,18 @@ class factory implements \phpbb\textformatter\cache_interface 'img' => '{L_IMAGE}', 'size' => '', 'color' => '', - 'email' => '', + 'email' => ' + + mailto: + + + ? + subject= + &body= + + + + ', ); /** diff --git a/tests/text_processing/tickets_data/PHPBB3-10922.html b/tests/text_processing/tickets_data/PHPBB3-10922.html index cdf8316df0..0c74809377 100644 --- a/tests/text_processing/tickets_data/PHPBB3-10922.html +++ b/tests/text_processing/tickets_data/PHPBB3-10922.html @@ -1 +1,3 @@ -user@example.org... \ No newline at end of file +user@example.org
+...
+user@example.org
diff --git a/tests/text_processing/tickets_data/PHPBB3-10922.txt b/tests/text_processing/tickets_data/PHPBB3-10922.txt index 348f8a1541..a8f09c40f2 100644 --- a/tests/text_processing/tickets_data/PHPBB3-10922.txt +++ b/tests/text_processing/tickets_data/PHPBB3-10922.txt @@ -1 +1,3 @@ -[email]user@example.org[/email][email=user@example.org]...[/email] \ No newline at end of file +[email]user@example.org[/email] +[email=user@example.org]...[/email] +[email subject="Hello" body="Sent from phpBB"]user@example.org[/email]