Code: Select all
if ($target) {
// use a "popup" window. this is XHTML compliant, suggested by
// Aaron Kalin. uses the $target as the new window name.
$target = htmlspecialchars($target);
$output .= " onclick=\"window.open(this.href, '$target');";
$output .= " return false;\"";
}
So my question are:
1. Why do you use java script instead of target="_blank"?
2. What do you think about <base target="_blank">?
It's a part of HTML 3.2 (XHTML 1.0) and is supported by many browsers (Netscape 3.0, IE 3.0, FF 1.0, ...).
So if the wiki parser put the base-tag around it's text the user also can add an own base-tag into the wiki text so the autor can decide by himself to open links in "_self". This is very usefull for links to own blog-entries or static pages.
I hope you understand me
bye