Code

Search is now W3C conform
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Jun 2005 12:10:00 +0000 (12:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Jun 2005 12:10:00 +0000 (12:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@626 594d385d-05f5-0310-b6e9-bd551577e9d8

html/helpviewer.php

index 3f91d4b9099559a045a27df0003b3b2d02cf47a3..342cc80f33f6e7cb56fe28b50f431e64a1d257ad 100644 (file)
@@ -91,24 +91,26 @@ function myone($par1,$par2,$par3,$par3)
 #fixme Theres a better method to handle replacment , preg_replace can handle arrays , this, would be little easier
 $i=0;
 $replacements=array();
-$replacements['range'][$i]['from']    = "/<!DOC.*<BODY >/";
+$replacements['range'][$i]['from']    = "@<!DOC.*<BODY >@si";
 $replacements['range'][$i]['to']      = "";
 $i++;
 $replacements['range'][$i]['from']  = "@<DIV[^>]*?>.*?DIV>@si";
 $replacements['range'][$i]['to']      = "";
 $i++;
+$replacements['range'][$i]['from']  = "'<code.*code>'";
+$replacements['range'][$i]['to']      = "";
+$i++;
 $replacements['range'][$i]['from']  = "/<HR>/";
 $replacements['range'][$i]['to']      = "";
 $i++;
 $replacements['range'][$i]['from']  = "@<ADDRESS[^>]*?>.*?ADDRESS>@si";
 $replacements['range'][$i]['to']      = "";
 $i++;
-$replacements['range'][$i]['from']  = "/<\/BODY.*>/";
+$replacements['range'][$i]['from']  = "@<\/BODY[^>]*?>.*?HTML>@si";
 $replacements['range'][$i]['to']      = "";
 $i++;
-
 /* Bsp . : Replace  Table Head to specified tableheader */ 
-$replacements['range'][$i]['from']  = "@<TABLE[^>]*?>.*?>@si";
+$replacements['range'][$i]['from']  = "'<TABLE.*>'";
 $replacements['range'][$i]['to']    = "<table border=0 cellspacing=1 bgcolor=\"#999999\" width=\"95%\" align=\"center\" >" ;
 
 /* Default pages */
@@ -333,13 +335,10 @@ function getcontents($file)
 function remove_unwanted_tags($str,$replacements)
 {
 #fixme This solution is ... ARRG
-  $str=str_replace("\n","||WasBr||",$str);
   foreach($replacements['range'] as $var)
   {
     $str=preg_replace($var['from'],$var['to'],$str);
   }
-
-  $str=str_replace("||WasBr||","\n",$str);
   return($str);
 }