Forum. MyNuke.ru

Forum. MyNuke.ru (http://forum.mynuke.ru/index.php)
-   Настройка и Изменение (http://forum.mynuke.ru/forumdisplay.php?f=11)
-   -   Убирание фильтрации html (http://forum.mynuke.ru/showthread.php?t=2713)

nok1a 30.03.2007 14:04

Убирание фильтрации html
 
Сабж - надо убрать нбковскую фильтрацию хтмля.
в mainfile.php я нашел такое -
Код:
function check_html ($str, $strip="") { /* The core of this code has been lifted from phpslash */ /* which is licenced under the GPL. */ include("config.php"); if ($strip == "nohtml") $AllowableHTML=array(''); $str = stripslashes($str); $str = eregi_replace("<[[:space:]]*([^>]*)[[:space:]]*>",'<\\1>', $str); // Delete all spaces from html tags . $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str); // Delete all attribs from Anchor, except an href, double quoted. $str = eregi_replace("<[[:space:]]* img[[:space:]]*([^>]*)[[:space:]]*>", '', $str); // Delete all img tags $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?javascript[[:punct:]]*\"?[^>]*>", '', $str); // Delete javascript code from a href tags -- Zhen-Xjell @ http://nukecops.com $tmp = ""; while (ereg("<(/?[[:alpha:]]*)[[:space:]]*([^>]*)>",$str,$reg)) { $i = strpos($str,$reg[0]); $l = strlen($reg[0]); if ($reg[1][0] == "/") $tag = strtolower(substr($reg[1],1)); else $tag = strtolower($reg[1]); if ($a = $AllowableHTML[$tag]) if ($reg[1][0] == "/") $tag = "</$tag>"; elseif (($a == 1) || ($reg[2] == "")) $tag = "<$tag>"; else { # Place here the double quote fix function. $attrb_list=delQuotes($reg[2]); // A VER //$attrb_list = ereg_replace("&","&amp;",$attrb_list); $tag = "<$tag" . $attrb_list . ">"; } # Attribs in tag allowed else $tag = ""; $tmp .= substr($str,0,$i) . $tag; $str = substr($str,$i+$l); } $str = $tmp . $str; return $str; exit; /* Squash PHP tags unconditionally */ $str = ereg_replace("<\?","",$str); return $str; }


что можно тут поправить, чтоб все работало(а то пытался сам- нюка ругается и не работает либо белый экран выдает) и хтмл не фильтровался?


кстати, в каком файле находятся настройки месседжа на первой странице?
надо поменять настройки отбражения титла, но хз где :oooo:

Soniks 01.04.2007 15:54

nok1a ну если вообще убрать, то так:
PHP код:
 function check_html ($str$strip="") {
 return 
$str;



Цитата кстати, в каком файле находятся настройки месседжа на первой странице?

функция message_box() в этом же файле


Часовой пояс GMT +4, время: 22:07.

Copyright © 2005 by Soniks