Skip to content

Commit

Permalink
Update functions.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sulaiman0dawod committed Apr 5, 2023
1 parent 03813d0 commit 4ed0aaa
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions includes/functions.class.php
Expand Up @@ -972,8 +972,8 @@ function ShowHeader($title = null)
$PowerBB->template->assign('keywords',$this->parse_keywords($keywords));

$description = strip_tags($ReplyInfo['text']);
$description = str_replace(","," ", $description);
$description = str_replace("..","", $description);
$description = str_replace(" .. ","", $description);

if(empty($description))
{
$PowerBB->template->assign('description',$ReplyInfo['title']);
Expand Down Expand Up @@ -1047,8 +1047,7 @@ function ShowHeader($title = null)

$PowerBB->template->assign('keywords',$this->parse_keywords($keywords));

$description = str_replace(","," ", $description);
$description = str_replace("..","", $description);
$description = str_replace(" .. ","", $description);
if(empty($description))
{ $PowerBB->template->assign('description',$SubjectInfo['title']);
}
Expand Down Expand Up @@ -1692,36 +1691,21 @@ function CleanText($string)

$string = str_replace("[","<", $string);
$string = str_replace("]",">", $string);
$string = str_replace(">","> ", $string);
$string = str_replace("<"," <", $string);
$string = str_replace(">",">", $string);
$string = str_replace("<","<", $string);
$string = strip_tags($string);
$string = str_replace("\r","{s}", $string);
$string = str_replace("\n","{s}", $string);
$string = str_replace("\t","{s}", $string);
$string = str_replace("\r\n","", $string);
$string = str_replace(","," ", $string);
$string = str_replace(" .. ","", $string);
$string = str_replace(" "," ", $string);

$originally_text = $string;
// Recreate string from array
// Recreate string from array
// See what we got
$pattern = '|[[\/\!]*?[^\[\]]*?]|si';
$replace = '';
$originally_text = preg_replace($pattern, $replace, $originally_text);

$originally_text = str_replace(" ",",", $originally_text);
$originally_text = str_replace("{s}",",", $originally_text);
$originally_text = str_replace(",,",",", $originally_text);
$originally_text = str_replace(",,",",", $originally_text);
$originally_text = str_replace($originally_text,"'".$originally_text."'", $originally_text);
$originally_text = str_replace("',","", $originally_text);
$originally_text = str_replace(",'","", $originally_text);
$originally_text = str_replace("'","", $originally_text);
$originally_text = str_replace(","," ", $originally_text);
$originally_text = str_replace("&nbsp;"," ", $originally_text);
$originally_text = str_replace(" "," ", $originally_text);
$originally_text = str_replace("&quot;","", $originally_text);
$originally_text = str_replace("&amp;quot;","", $originally_text);
$originally_text = str_replace(" "," ", $originally_text);
$originally_text = str_replace(" "," ", $originally_text);
$originally_text = str_replace(".."," ", $originally_text);

$originally_text = strip_tags($originally_text);
$originally_text = htmlspecialchars($originally_text);
Expand Down

0 comments on commit 4ed0aaa

Please sign in to comment.