Index: branches/unlabeled/unlabeled-1.42.2/kernel/units/general/cat_event_handler.php =================================================================== diff -u -N -r4252 -r4395 --- branches/unlabeled/unlabeled-1.42.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4252) +++ branches/unlabeled/unlabeled-1.42.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4395) @@ -611,11 +611,7 @@ $event->redirect = false; $search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search'; - $keywords = trim($this->Application->GetVar('keywords')); - if( !$this->Application->GetVar('INPORTAL_ON') ) - { - $keywords = unhtmlentities($keywords); - } + $keywords = unhtmlentities( trim($this->Application->GetVar('keywords')) ); $query_object =& $this->Application->recallObject('HTTPQuery'); $sql = 'SHOW TABLES LIKE "'.$search_table.'"'; @@ -938,10 +934,7 @@ switch($record['FieldType']) { case 'text': - if( !$this->Application->GetVar('INPORTAL_ON') ) - { - $keywords[$field] = unhtmlentities( $keywords[$field] ); - } + $keywords[$field] = unhtmlentities( $keywords[$field] ); if(strlen($keywords[$field]) >= $this->Application->ConfigValue('Search_MinKeyword_Length')) { Index: branches/unlabeled/unlabeled-1.42.2/core/units/general/cat_event_handler.php =================================================================== diff -u -N -r4252 -r4395 --- branches/unlabeled/unlabeled-1.42.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4252) +++ branches/unlabeled/unlabeled-1.42.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4395) @@ -611,11 +611,7 @@ $event->redirect = false; $search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search'; - $keywords = trim($this->Application->GetVar('keywords')); - if( !$this->Application->GetVar('INPORTAL_ON') ) - { - $keywords = unhtmlentities($keywords); - } + $keywords = unhtmlentities( trim($this->Application->GetVar('keywords')) ); $query_object =& $this->Application->recallObject('HTTPQuery'); $sql = 'SHOW TABLES LIKE "'.$search_table.'"'; @@ -938,10 +934,7 @@ switch($record['FieldType']) { case 'text': - if( !$this->Application->GetVar('INPORTAL_ON') ) - { - $keywords[$field] = unhtmlentities( $keywords[$field] ); - } + $keywords[$field] = unhtmlentities( $keywords[$field] ); if(strlen($keywords[$field]) >= $this->Application->ConfigValue('Search_MinKeyword_Length')) { Index: branches/unlabeled/unlabeled-1.102.2/globals.php =================================================================== diff -u -N -r4244 -r4395 --- branches/unlabeled/unlabeled-1.102.2/globals.php (.../globals.php) (revision 4244) +++ branches/unlabeled/unlabeled-1.102.2/globals.php (.../globals.php) (revision 4395) @@ -500,7 +500,7 @@ if ($r[$i] == "<") { $i++; continue; } - $r[$i] = preg_replace("/($k)/i", "$OpenTag\\1$CloseTag", $r[$i]); + $r[$i] = preg_replace('/('.preg_quote($k, '/').')/i', "$OpenTag\\1$CloseTag", $r[$i]); } } return join("", $r);