|
@@ 1309-1325 (lines=17) @@
|
| 1306 |
|
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'), |
| 1307 |
|
), |
| 1308 |
|
'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">', |
| 1309 |
|
'validate' => function (&$tag, &$data, $disabled) |
| 1310 |
|
{ |
| 1311 |
|
global $image_proxy_enabled, $image_proxy_secret, $boardurl; |
| 1312 |
|
|
| 1313 |
|
$data = strtr($data, array('<br>' => '')); |
| 1314 |
|
$scheme = parse_url($data, PHP_URL_SCHEME); |
| 1315 |
|
if ($image_proxy_enabled) |
| 1316 |
|
{ |
| 1317 |
|
if (empty($scheme)) |
| 1318 |
|
$data = 'http://' . ltrim($data, ':/'); |
| 1319 |
|
|
| 1320 |
|
if ($scheme != 'https') |
| 1321 |
|
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret); |
| 1322 |
|
} |
| 1323 |
|
elseif (empty($scheme)) |
| 1324 |
|
$data = '//' . ltrim($data, ':/'); |
| 1325 |
|
}, |
| 1326 |
|
'disabled_content' => '($1)', |
| 1327 |
|
), |
| 1328 |
|
array( |
|
@@ 1332-1348 (lines=17) @@
|
| 1329 |
|
'tag' => 'img', |
| 1330 |
|
'type' => 'unparsed_content', |
| 1331 |
|
'content' => '<img src="$1" alt="" class="bbc_img">', |
| 1332 |
|
'validate' => function (&$tag, &$data, $disabled) |
| 1333 |
|
{ |
| 1334 |
|
global $image_proxy_enabled, $image_proxy_secret, $boardurl; |
| 1335 |
|
|
| 1336 |
|
$data = strtr($data, array('<br>' => '')); |
| 1337 |
|
$scheme = parse_url($data, PHP_URL_SCHEME); |
| 1338 |
|
if ($image_proxy_enabled) |
| 1339 |
|
{ |
| 1340 |
|
if (empty($scheme)) |
| 1341 |
|
$data = 'http://' . ltrim($data, ':/'); |
| 1342 |
|
|
| 1343 |
|
if ($scheme != 'https') |
| 1344 |
|
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret); |
| 1345 |
|
} |
| 1346 |
|
elseif (empty($scheme)) |
| 1347 |
|
$data = '//' . ltrim($data, ':/'); |
| 1348 |
|
}, |
| 1349 |
|
'disabled_content' => '($1)', |
| 1350 |
|
), |
| 1351 |
|
array( |