Try this workaround to solve problem with TextSearchExpanded. (I'm sorry for the $this->lang['xxx'] coding, please replace them with the original content...) %%(php)..."; $output = $this->FormOpen("", "", "get"); $output .= '
'.$this->lang['search_for'].':  htmlspecialchars_ent(stripslashes($_REQUEST["phrase"])); } $output .= '" />
'; $output .= $this->FormClose(); if (isset($_REQUEST["phrase"]) && $phrase = $_REQUEST["phrase"]) { $phrase = stripslashes($phrase); $output .= "
"; $results = $this->FullTextSearch($phrase); switch (count($results)) { case 0: $output .= sprintf($this->lang['zero_result_for'], $phrase); break; case 1: $output .= sprintf($this->lang['one_result_for'], $phrase); break; default: $output .= sprintf($this->lang['n_results_for'], $phrase, count($results)); break; } $phrase = str_replace("\"", "", $phrase); if ($results) { $output .= ""; $STORE_FORMATING_AS_TEXT = 1; #preg_quote $phrase = preg_replace('/(\.|\\|\?|\[|\^|\]|\$|\(|\)\|{\|\}|\=|\!|\<|\>|\||\:|\/)/', "\\\\$1", $phrase); $phrase = preg_replace('/\-\S*|\s\+/', ' ', " $phrase "); $phrase = preg_replace(array('/^ +| +$/', '/ \*/', '/\*\w*/', '/ +/'), array('', '', '$1\S*', '|'), $phrase); foreach ($results as $i => $page) { preg_match_all("/(.{0,120})($phrase)(.{0,120})/is",$page['body'],$matchString); $text = $this->htmlspecialchars_ent(implode('
',$matchString[0])); $text = str_replace('<br />', "$etc
$etc", $text); // include("formatters/wakka.php"); $highlightMatch = preg_replace("/($phrase)/i","$1",$text,-1); $matchText = "$etc$highlightMatch$etc"; $output .= " "; } $output .= "
".($i+1)."
".$this->Link($page["tag"])." $page[time]
  $matchText
 
"; } } $output = $this->ReturnSafeHtml($output); echo $output; ?>%% Every action in Wikka should use the coding : %%(php)$output = "...."; ... $output .= "....."; ... print($this->ReturnSafeHtml($output));%% To prevent javascript attack, but this is another problem. ~&Actually, SafeHTML is needed only for those "parts" of an action where user input **directly** results in HTML output (such as an action parameter //used as// a tag attribute). When HTML is completely **generated** by an action, it's not needed (Wikka should take care by itself that //generated// code is "safe"). --JavaWoman --DotMG ---- As part of the SemanticMarkup drive, why not replace //all// that tag-soup table with: %%(php) $highlightMatch = preg_replace("/($phrase)/i","$1",$text,-1); $matchText = "…".$highlightMatch."…"; $output .= "\n

".($i+1)." ".$this->Link($page["tag"])." — ".$page[time]."

"; $output .= "\n
".$matchText."
\n";%% You remove all the unnecessary table and presentational spans. Use CSS to present the double emphasis exactly how you want, that is what CSS is there for. --IanAndolina