Links in popup windows now target different window.

git-svn-id: https://develop.svn.wordpress.org/trunk@111 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2003-05-28 08:40:34 +00:00
parent 4064397ab1
commit c5f7c18f0d
2 changed files with 16 additions and 7 deletions

View File

@@ -115,6 +115,14 @@ function wpautop($pee, $br=1) {
return $pee;
}
function popuplinks($text) {
// Comment text in popup windows should be filtered through this.
// Right now it's a moderately dumb function, ideally it would detect whether
// a target or rel attribute was already there and adjust its actions accordingly.
$text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
return $text;
}
function autobrize($content) {
$content = preg_replace("/<br>\n/", "\n", $content);
$content = preg_replace("/<br \/>\n/", "\n", $content);