Browse Source

Fixed URL matching with double dashes in hostname

pull/40/head
Savetheinternet 13 years ago
parent
commit
6bbe658370
  1. 6
      inc/functions.php

6
inc/functions.php

@ -285,9 +285,11 @@
function markup(&$body) { function markup(&$body) {
global $board; global $board;
$body = utf8tohtml($body, true);
if(MARKUP_URLS) if(MARKUP_URLS)
$body = preg_replace(URL_REGEX, "<a href=\"$0\">$0</a>", $body); $body = preg_replace(URL_REGEX, "<a href=\"$0\">$0</a>", $body);
if(AUTO_UNICODE) { if(AUTO_UNICODE) {
$body = str_replace('...', '…', $body); $body = str_replace('...', '…', $body);
$body = str_replace('<--', '', $body); $body = str_replace('<--', '', $body);
@ -299,8 +301,6 @@
$body = str_replace('--', '–', $body); // en dash $body = str_replace('--', '–', $body); // en dash
} }
$body = utf8tohtml($body, true);
// Cites // Cites
if(preg_match_all('/(^|\s)&gt;&gt;([0-9]+?)(\s|$)/', $body, $cites)) { if(preg_match_all('/(^|\s)&gt;&gt;([0-9]+?)(\s|$)/', $body, $cites)) {
$previousPosition = 0; $previousPosition = 0;

Loading…
Cancel
Save