Code Duplication    Length = 20-20 lines in 2 locations

Sources/Subs.php 2 locations

@@ 1414-1433 (lines=20) @@
1411
					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1412
				),
1413
				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1414
				'validate' => function (&$tag, &$data, $disabled)
1415
				{
1416
					global $image_proxy_enabled, $user_info;
1417
1418
					$data = strtr($data, array('<br>' => ''));
1419
					$scheme = parse_url($data, PHP_URL_SCHEME);
1420
					if ($image_proxy_enabled)
1421
					{
1422
						if (!empty($user_info['possibly_robot']))
1423
							return;
1424
1425
						if (empty($scheme))
1426
							$data = 'http://' . ltrim($data, ':/');
1427
1428
						if ($scheme != 'https')
1429
							$data = get_proxied_url($data);
1430
					}
1431
					elseif (empty($scheme))
1432
						$data = '//' . ltrim($data, ':/');
1433
				},
1434
				'disabled_content' => '($1)',
1435
			),
1436
			array(
@@ 1440-1459 (lines=20) @@
1437
				'tag' => 'img',
1438
				'type' => 'unparsed_content',
1439
				'content' => '<img src="$1" alt="" class="bbc_img">',
1440
				'validate' => function (&$tag, &$data, $disabled)
1441
				{
1442
					global $image_proxy_enabled, $user_info;
1443
1444
					$data = strtr($data, array('<br>' => ''));
1445
					$scheme = parse_url($data, PHP_URL_SCHEME);
1446
					if ($image_proxy_enabled)
1447
					{
1448
						if (!empty($user_info['possibly_robot']))
1449
							return;
1450
1451
						if (empty($scheme))
1452
							$data = 'http://' . ltrim($data, ':/');
1453
1454
						if ($scheme != 'https')
1455
							$data = get_proxied_url($data);
1456
					}
1457
					elseif (empty($scheme))
1458
						$data = '//' . ltrim($data, ':/');
1459
				},
1460
				'disabled_content' => '($1)',
1461
			),
1462
			array(