aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter
diff options
context:
space:
mode:
authorMáté Bartus <CHItA@users.noreply.github.com>2017-09-07 15:08:12 +0200
committerGitHub <noreply@github.com>2017-09-07 15:08:12 +0200
commitda357f80f859844bcf0323201045ca082b9d68e7 (patch)
treeac124713422f2b58b29d07ffd603840c5da0fc1b /phpBB/phpbb/textformatter
parent9af394eff3d3f571e8c8d82c4b2c10bc3de4accd (diff)
parente67d2ae3b9d71bfd9aa82ec250c13d1186b1e280 (diff)
downloadforums-da357f80f859844bcf0323201045ca082b9d68e7.tar
forums-da357f80f859844bcf0323201045ca082b9d68e7.tar.gz
forums-da357f80f859844bcf0323201045ca082b9d68e7.tar.bz2
forums-da357f80f859844bcf0323201045ca082b9d68e7.tar.xz
forums-da357f80f859844bcf0323201045ca082b9d68e7.zip
Merge pull request #4903 from rxu/ticket/15323
[ticket/15323] Allow Twig syntax in bbcode.html
Diffstat (limited to 'phpBB/phpbb/textformatter')
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 3f2e0ab8cb..b3616a3063 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -521,7 +521,9 @@ class factory implements \phpbb\textformatter\cache_interface
protected function extract_templates($template)
{
// Capture the template fragments
- preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER);
+ // Allow either phpBB template or the Twig syntax
+ preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER) ?:
+ preg_match_all('#{% for (.*?) in .*? %}(.*?){% endfor %}#s', $template, $matches, PREG_SET_ORDER);
$fragments = array();
foreach ($matches as $match)