When you want to make your XOOPS xhtml-strict you have to watch out for a few things that differ from xhtml-transitional. One of these things is that target=blank is not allowed in xhtml-strict. I know that making XOOPS xhtml-strict is ahead of time, since XOOPS struggles to be xhtml-transitional, but I wanted to let you know. Add this function between the head-tags of your theme:
<script type="text/javascript">
<!--
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
//-->
</script>
Also there must be an onload of this function inside the body-tag, like:
<body onload="externalLinks();">
Also class/module.textsanitizer.php must be changed. Look for
target="_blank"
and replace with
rel="external"
And this is the method how links that have to be opened in a new window must be written. Just add rel="external" to any link that has to open in a new window. I must confess that I don't know where the credits for the above snippet have to go to and how to place the function more elegant.
from all that code in the module.textsanitzer.php how can I know which is the specific item I want to replace with rel="external" ?