[[equiv:what content-text]] results in : $Log: metatag.php,v $ Revision 1.10 2004/01/26 10:05:19 pts00065 Ensure that HTMLTitleFmt is an array Revision 1.9 2004/01/10 16:19:48 pts00065 Refined the refresh regex. Revision 1.8 2004/01/10 15:58:08 pts00065 Having a refresh open in your wiki is potentially harmfull Visitors might add a redirect to a dirty, or worse site. Now you will need to define the allowed redirects first Revision 1.7 2004/01/06 17:57:26 pts00065 cleanup Revision 1.6 2004/01/06 14:55:44 pts00065 Changed to inline replacements bram 05-01-2004 1.0 Initial version as file */ # the refresh it potential harmfull, define the allowed sites here: $AllowedRefresh['tropischetuin']="http://tropischetuin.pagina.nl"; $AllowedRefresh['egel']="http://egel.pagina.nl"; $AllowedRefresh['winkel']="http://winkel.brambring.nl"; $MetaTagName="/\\[\\[meta:([^ ]+) +([^\\]]+)\\]\\]/e"; $InlineReplacements[$MetaTagName] = ''; $MetaTagRefresh="/\\[\\[refresh:([^ \\]]+) *([0-9]*)\\]\\]/e"; $InlineReplacements[$MetaTagRefresh] = ''; function PrintMetaTags() { global $MetaTagName; global $MetaTagRefresh; global $Text; global $action; global $AllowedRefresh; if ( $action and ( $action!='browse' ) ) { return ; }; preg_match_all($MetaTagName,$Text,$match); for ($i=0; $i< count($match[0]); $i++) { print "\n"; } preg_match_all($MetaTagRefresh,$Text,$match); for ($i=0; $i< count($match[0]); $i++) { $target=$AllowedRefresh[$match[1][$i]]; $time=$match[2][$i]; if ( $target ) { if ( ! $time ) { $time=1; } print "\n"; } } } #To add the function PrintMetaTags HTMLTitleFmt should be an array if ( ! is_array($HTMLTitleFmt) ) { $HTMLTitleFmt=array($HTMLTitleFmt); } array_push($HTMLTitleFmt,"function:PrintMetaTags") ?>