$message = trim($message);
if ($basepath != '') {
- $message = AddHostname($message, $basepath);
+ $message = addHostname($message, $basepath);
}
return $message;
*/
function addHostnameSub($matches, $basepath) {
$base = parse_url($basepath);
+ unset($base['query']);
+ unset($base['fragment']);
$link = $matches[0];
$url = $matches[1];
foreach ($matches AS $match) {
$body = preg_replace_callback($match,
function ($match) use ($basepath) {
- return AddHostnameSub($match, $basepath);
+ return addHostnameSub($match, $basepath);
}, $body);
}
return $body;