mirror of
https://github.com/friendica/friendica
synced 2025-04-26 10:30:11 +00:00
target="_blank" instead of target="external-link"
This commit is contained in:
parent
4591790ea7
commit
01971428aa
8 changed files with 45 additions and 26 deletions
|
@ -964,7 +964,7 @@ if(! function_exists('linkify')) {
|
|||
* @param string $s
|
||||
*/
|
||||
function linkify($s) {
|
||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" target="external-link">$1</a>', $s);
|
||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" target="_blank">$1</a>', $s);
|
||||
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$s);
|
||||
return($s);
|
||||
}}
|
||||
|
@ -1297,13 +1297,13 @@ function prepare_body(&$item,$attach = false) {
|
|||
$tag["url"] = $searchpath.strtolower($tag["term"]);
|
||||
|
||||
if ($tag["type"] == TERM_HASHTAG) {
|
||||
$hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"_blank\">".$tag["term"]."</a>";
|
||||
$prefix = "#";
|
||||
} elseif ($tag["type"] == TERM_MENTION) {
|
||||
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"_blank\">".$tag["term"]."</a>";
|
||||
$prefix = "@";
|
||||
}
|
||||
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"_blank\">".$tag["term"]."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ function prepare_body(&$item,$attach = false) {
|
|||
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
|
||||
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
|
||||
|
||||
$as .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="external-link" >' . $icon . '</a>';
|
||||
$as .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="_blank" >' . $icon . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue