diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2019-11-25 18:34:04 +0100 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2019-11-25 18:34:04 +0100 |
commit | d6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07 (patch) | |
tree | 39d8da38b92d9c472c51b419bd98873f70ebf2c2 /tests/text_formatter/s9e | |
parent | bf96786cda17d7f9505bc311179fe234cac49094 (diff) | |
download | forums-d6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07.tar forums-d6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07.tar.gz forums-d6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07.tar.bz2 forums-d6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07.tar.xz forums-d6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07.zip |
[ticket/16228] Fix BBCodes merging
PHPBB3-16228
Diffstat (limited to 'tests/text_formatter/s9e')
-rw-r--r-- | tests/text_formatter/s9e/bbcode_merger_test.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/bbcode_merger_test.php b/tests/text_formatter/s9e/bbcode_merger_test.php index 815539056b..5ec0c91971 100644 --- a/tests/text_formatter/s9e/bbcode_merger_test.php +++ b/tests/text_formatter/s9e/bbcode_merger_test.php @@ -275,6 +275,22 @@ class phpbb_textformatter_s9e_bbcode_merger_test extends phpbb_test_case </table> <p> </p>' ], + [ + // https://www.phpbb.com/community/viewtopic.php?f=438&t=2530451 + '[issue]{NUMBER}[/issue]', + '<a href="/default/issues/{NUMBER}"> Issue #{NUMBER}</a>', + + '[issue={SIMPLETEXT}]{NUMBER}[/issue]', + '<a href="/{SIMPLETEXT}/issues/{NUMBER}"> Issue #{NUMBER} ({SIMPLETEXT})</a>', + + '[issue={SIMPLETEXT?}]{NUMBER}[/issue]', + '<a> + <xsl:choose> + <xsl:when test="@issue"><xsl:attribute name="href">/<xsl:value-of select="@issue"/>/issues/<xsl:value-of select="@content"/></xsl:attribute> Issue #<xsl:value-of select="@content"/> (<xsl:value-of select="@issue"/>)</xsl:when> + <xsl:otherwise><xsl:attribute name="href">/default/issues/<xsl:value-of select="@content"/></xsl:attribute> Issue #<xsl:value-of select="@content"/></xsl:otherwise> + </xsl:choose> + </a>' + ], ]; } } |