summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 511c632)
raw | patch | inline | side by side (parent: 511c632)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Jun 2005 12:10:00 +0000 (12:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Jun 2005 12:10:00 +0000 (12:10 +0000) |
html/helpviewer.php | patch | blob | history |
diff --git a/html/helpviewer.php b/html/helpviewer.php
index 3f91d4b9099559a045a27df0003b3b2d02cf47a3..342cc80f33f6e7cb56fe28b50f431e64a1d257ad 100644 (file)
--- a/html/helpviewer.php
+++ b/html/helpviewer.php
#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 */
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);
}