Change regex to require that URL_PROTOCOLS is at the beginning of a link
(e.g. [[news:bla]]) for it to match.
Note: This will break if someone decides to reverse the order of
replaceExternal and replaceInternal again.
# Don't allow internal links to pages containing
# PROTO: where PROTO is a valid URL protocol; these
# should be external links.
- if (preg_match('/((?:'.URL_PROTOCOLS.'):)/', $m[1])) {
+ if (preg_match('/^((?:'.URL_PROTOCOLS.'):)/', $m[1])) {
$s .= $prefix . '[[' . $line ;
continue;
}