Code

images shown correct
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Jun 2005 13:06:02 +0000 (13:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Jun 2005 13:06:02 +0000 (13:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@673 594d385d-05f5-0310-b6e9-bd551577e9d8

html/helpviewer.php
include/functions_helpviewer.inc

index 83c3a0240472cf19b3865527f44764e198c5d933..bde8ffb1ca1cdbe7d97d580920be4146ea6ced4a 100644 (file)
@@ -93,23 +93,37 @@ set_error_handler('gosaRaiseError');
 /* Define which tags musst be delete, header, navigation, banner */
 $replacements=array();
 $replacements['from']=array("@<!DOC.*<BODY >@si",
+    "/border=\".*\"/i",
     "@<DIV[^>]*?>.*?DIV>@si",
     "'<code.*code>'",
+//    "/alt=\".*\"/i",
     "/<HR>/",
     "@<ADDRESS[^>]*?>.*?ADDRESS>@si",
     "@<\/BODY[^>]*?>.*?HTML>@si",
     "'<TABLE.*>'",
     "/src.*icons/i",
-    "/<H1 ALIGN=\"CENTER\">/");
+    "/src=\"/i",
+    "/<H1 ALIGN=\"CENTER\">/",
+ /* picture replacements */
+ //  "",
+    );
+
+
 $replacements['to']=array("",
+    " border=\"0\" ",
     "",
     "",
+  //  "",
     "",
     "",
     "",
     "<table border=1 cellspacing=0 bgcolor=\"#E0E0E0\" width=\"95%\" align=\"center\" cellpadding=\"3\">",
-    "src=\"images",
-    "<H1>");
+    "src=\"",
+    "src=\"images/",
+    "<H1>",
+ /* picture replacements */
+//    "",
+  );
 
 
 /* Default pages */
@@ -236,9 +250,9 @@ if(!file_exists(HELP_BASEDIR."/en/manual_gosa_en/")){
     if(isset($_GET['mark'])){
       $marks = ($_SESSION['lastresults']) ; 
       $help_contents = markup_page($help_contents[$page]['content'],$marks[$page]);
-      $help_contents=remove_unwanted_tags($help_contents,$replacements);  
+      $help_contents=$help_contents;  
     }else{
-      $help_contents=remove_unwanted_tags($help_contents[$page]['content'],$replacements);
+      $help_contents=$help_contents[$page]['content'];
     }
 
     $smarty->assign("help_contents",$help_contents);
index 9d699c58941e8e14b2c3b0ced00a86665a745228..cc6abafc0eb11f7c6b1e3fc81e0cb877befc4256 100644 (file)
@@ -63,7 +63,7 @@ function readfiles($basedir,$prefix,$suffix,$onlyIndex,$singlepage=false)
 
         /* Readfile conent too ? */
         if(!$onlyIndex){
-          $str[$file]['content']= remove_unwanted_tags(linkwrapper(getcontents($basedir.$file),""),$replacements);
+          $str[$file]['content']  = remove_unwanted_tags(linkwrapper(getcontents($basedir.$file),""),$replacements);
           $str[$file]['headline'] = getheader_from_content($str[$file]['content']);
         }
 
@@ -86,7 +86,7 @@ function readfiles($basedir,$prefix,$suffix,$onlyIndex,$singlepage=false)
 
     /* If onlyIndex == true skip reading content */
     if(!$onlyIndex){
-      $str[$file]['content']= remove_unwanted_tags(linkwrapper(getcontents($basedir.$file),""),$replacements);
+      $str[$file]['content']  = remove_unwanted_tags(linkwrapper(getcontents($basedir.$file),""),$replacements);
       $str[$file]['headline'] = getheader_from_content($str[$file]['content']);
     }