Fix preg_replace de-addslashing error

hmmmm
This commit is contained in:
Kak2X
2021-06-19 03:08:35 +02:00
committed by GitHub
parent aa9bc5d780
commit fd06a85c2d

View File

@@ -214,6 +214,7 @@
$sex=2; $sex=2;
$oldtitle = ""; $oldtitle = "";
$title = stripslashes($title);
while ($oldtitle != $title) { while ($oldtitle != $title) {
$oldtitle = $title; $oldtitle = $title;
$title=preg_replace("'<(b|i|u|s|small|br)>'si", '[\\1]', $title); $title=preg_replace("'<(b|i|u|s|small|br)>'si", '[\\1]', $title);
@@ -231,6 +232,8 @@
$title=preg_replace("'(face|style|class|size|id)=\'([^ ].*?)\''si", '', $title); $title=preg_replace("'(face|style|class|size|id)=\'([^ ].*?)\''si", '', $title);
$title=preg_replace("'(face|style|class|size|id)=([^ ].*?)'si", '', $title); $title=preg_replace("'(face|style|class|size|id)=([^ ].*?)'si", '', $title);
} }
$title = addslashes($title);
$bio=preg_replace("'<iframe'si", '&lt;iframe', $bio); $bio=preg_replace("'<iframe'si", '&lt;iframe', $bio);
$bio=preg_replace("'<script'si", '&lt;script', $bio); $bio=preg_replace("'<script'si", '&lt;script', $bio);
$bio=preg_replace("'onload'si", 'o<z>nload', $bio); $bio=preg_replace("'onload'si", 'o<z>nload', $bio);