Skip to content

Commit c109271

Browse files
committed
Quick fix #46
1 parent c72ba72 commit c109271

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/parser.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,8 @@ function do_bbcode(string $text, bool $is_signature = false)
868868

869869
if (($is_signature && $pun_config['p_sig_img_tag'] == '1') || (!$is_signature && $pun_config['p_message_img_tag'] == '1'))
870870
{
871-
$pattern_callback[] = '%\[img\]((ht|f)tps?://)([^\s<"\x00-\x1f]*?)\[/img\]%';
872-
$pattern_callback[] = '%\[img=([^\[\x00-\x1f]*?)\]((ht|f)tps?://)([^\s<"\x00-\x1f]*?)\[/img\]%';
871+
$pattern_callback[] = '%\[img\]((ht|f)tps?://)([^\s<"\[\x00-\x1f]*?)\[/img\]%';
872+
$pattern_callback[] = '%\[img=([^\[\x00-\x1f]*?)\]((ht|f)tps?://)([^\s<"\[\x00-\x1f]*?)\[/img\]%';
873873
if ($is_signature)
874874
{
875875
$replace_callback[] = function($matches) { return handle_img_tag($matches[1].$matches[3], true); };
@@ -880,10 +880,10 @@ function do_bbcode(string $text, bool $is_signature = false)
880880
$replace_callback[] = function($matches) { return handle_img_tag($matches[1].$matches[3], false); };
881881
$replace_callback[] = function($matches) { return handle_img_tag($matches[2].$matches[4], false, $matches[1]); };
882882

883-
$pattern_callback[] = '%\[imgr\]((ht|f)tps?://)([^\s<"\x00-\x1f]*?)\[/imgr\]%';
884-
$pattern_callback[] = '%\[imgr=([^\[\x00-\x1f]*?)\]((ht|f)tps?://)([^\s<"\x00-\x1f]*?)\[/imgr\]%';
885-
$pattern_callback[] = '%\[imgl\]((ht|f)tps?://)([^\s<"\x00-\x1f]*?)\[/imgl\]%';
886-
$pattern_callback[] = '%\[imgl=([^\[\x00-\x1f]*?)\]((ht|f)tps?://)([^\s<"\x00-\x1f]*?)\[/imgl\]%';
883+
$pattern_callback[] = '%\[imgr\]((ht|f)tps?://)([^\s<"\[\x00-\x1f]*?)\[/imgr\]%';
884+
$pattern_callback[] = '%\[imgr=([^\[\x00-\x1f]*?)\]((ht|f)tps?://)([^\s<"\[\x00-\x1f]*?)\[/imgr\]%';
885+
$pattern_callback[] = '%\[imgl\]((ht|f)tps?://)([^\s<"\[\x00-\x1f]*?)\[/imgl\]%';
886+
$pattern_callback[] = '%\[imgl=([^\[\x00-\x1f]*?)\]((ht|f)tps?://)([^\s<"\[\x00-\x1f]*?)\[/imgl\]%';
887887

888888
$replace_callback[] = function($matches) { return handle_img_tag($matches[1].$matches[3], false, null, 'right'); };
889889
$replace_callback[] = function($matches) { return handle_img_tag($matches[2].$matches[4], false, $matches[1], 'right'); };

0 commit comments

Comments
 (0)