-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.0, 3.2.10-RC1
-
None
If a serial call is being made like{{}}
make_clickable('http://localhost/phpBB3/index.php', false, 'class1'); make_clickable('http://localhost/phpBB3/index.php', false, 'class2'); make_clickable('http://localhost/phpBB3/index.php', false, 'class3');
|
{{}}you'll always get the same result as with the 1st call
<!-- l --><a class="class1-local" href="http://localhost/331/index.php">index.php</a><!-- l -->
|
The cause is that static array $magic_url_match_args is just got appended with every call so preg_replace_callback()}}applies the 1st suitable regex which is always {{class1 related.
Also if one more call with email got appended, f.e. {{}}
make_clickable('test@email.com', false, 'class4');
|
the result will be multiplied by all make_clickable() calls, like
<!-- e --><a href="mailto:test@email.com"><!-- e --><a href="mailto:test@email.com"><!-- e --><a href="mailto:test@email.com"><!-- e --><a href="mailto:test@email.com">test@email.com</a><!-- e --></a><!-- e --></a><!-- e --></a><!-- e -->
|