diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-05-29 16:15:04 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-05-29 16:15:04 +0200 |
commit | 86ad1a92c87a6bde184b59a981b40752bf2f61b1 (patch) | |
tree | 7ac4c84bd731c01ca6466126cfbdac1a9c1f84a7 /phpBB/phpbb | |
parent | 2aecb9406811cfa6fa9a6de1094479d4b62990f0 (diff) | |
parent | 5c78be56ec0d32a7934bdfd83a4fb0242befc1fa (diff) | |
download | forums-86ad1a92c87a6bde184b59a981b40752bf2f61b1.tar forums-86ad1a92c87a6bde184b59a981b40752bf2f61b1.tar.gz forums-86ad1a92c87a6bde184b59a981b40752bf2f61b1.tar.bz2 forums-86ad1a92c87a6bde184b59a981b40752bf2f61b1.tar.xz forums-86ad1a92c87a6bde184b59a981b40752bf2f61b1.zip |
Merge pull request #3561 from s9e/ticket/10922
[ticket/10922] Added support for body and subject in email BBCode
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/factory.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 9576abe1f0..e07a1b52ca 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=rawurlencode} body={TEXT;optional;postFilter=rawurlencode}]{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' => '<img src="{IMAGEURL}" alt="{L_IMAGE}"/>', 'size' => '<span style="font-size: {FONTSIZE}%; line-height: normal"><xsl:apply-templates/></span>', 'color' => '<span style="color: {COLOR}"><xsl:apply-templates/></span>', - 'email' => '<a href="mailto:{EMAIL}"><xsl:apply-templates/></a>', + 'email' => '<a> + <xsl:attribute name="href"> + <xsl:text>mailto:</xsl:text> + <xsl:value-of select="@email"/> + <xsl:if test="@subject or @body"> + <xsl:text>?</xsl:text> + <xsl:if test="@subject">subject=<xsl:value-of select="@subject"/></xsl:if> + <xsl:if test="@body"><xsl:if test="@subject">&</xsl:if>body=<xsl:value-of select="@body"/></xsl:if> + </xsl:if> + </xsl:attribute> + <xsl:apply-templates/> + </a>', ); /** |