Merge branch '0.9.x' into 1.0.x
Conflicts: README lib/default.php
This commit is contained in:
13
lib/util.php
13
lib/util.php
@@ -875,7 +875,8 @@ function common_linkify($url) {
|
||||
$longurl = $url;
|
||||
}
|
||||
}
|
||||
$attrs = array('href' => $canon, 'title' => $longurl, 'rel' => 'external');
|
||||
|
||||
$attrs = array('href' => $canon, 'title' => $longurl);
|
||||
|
||||
$is_attachment = false;
|
||||
$attachment_id = null;
|
||||
@@ -911,6 +912,16 @@ function common_linkify($url) {
|
||||
$attrs['id'] = "attachment-{$attachment_id}";
|
||||
}
|
||||
|
||||
// Whether to nofollow
|
||||
|
||||
$nf = common_config('nofollow', 'external');
|
||||
|
||||
if ($nf == 'never') {
|
||||
$attrs['rel'] = 'external';
|
||||
} else {
|
||||
$attrs['rel'] = 'nofollow external';
|
||||
}
|
||||
|
||||
return XMLStringer::estring('a', $attrs, $url);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user