Merge pull request #75 from Kak2X/patch-2

Fix preg_replace de-addslashing error
This commit is contained in:
Xkeeper 2021-06-18 18:12:55 -07:00 committed by GitHub
commit 1d83af0438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);