O contido HTML, a función PHP seguro

Sábado, 28 de marzo do 2009 02:43
Publicado na categoría PHP

Html entrada para a función é de limpeza, pero moi fermoso o ensaio gozukuor etmedım

copyright: http://www.ysfkc.com/dosyalar/guvenliHtml.phps

función guvenliHtml ($ texto) (
global $ recurso;
KonumK $ = 0; # <(estaban abaixo), xa vimos, a posición final do personaxe
KonumB $ = 0; #> (Buyuktur), vimos, a posición final do personaxe
$ Tag_mi = False; tag # dentro de ti?
OzellikSablon $ = "# propiedade = valor a ser usado para chamadas global formatindaki
$ TagTablosu = array (); información etiqueta #, substitúe alacagi global
$ OzellikTablosu = array (); función # atributo () información sobre a localización do alacagi global
$ DegerTablosu = array (); # valor (value), un espazo de información global alacagi

# As variables globais definidas para valores
guvenliGlobal ();

# Procesamento de Texto sobre o proceso de corrección faise antes
$ Texto = onDuzeltme ($ texto);

$ I = 0;
Buffer $ = ";
$ KonumK = strpos ($ texto, '<', $ i); # <carácter na primeira posición rastlandigi
$ KonumB = strpos ($ texto, '>', $ i); #> personaxe na primeira posición rastlandigi

# Lea o texto dentro da etiqueta
while (true) (
# Se o carácter <antes rastlandiysa
# Ou <characters foron found, but> carácter bulunamadiysa
if (($ konumK! == false & & $ konumK <$ konumB) | | ($ konumK! == false & & $ konumB === false)) (
# Icerisindeysek Tag
if ($ tag_mi) (
# Tag en olamayacagi <sandigimiz parte para a etiqueta
# Basindaki carácter <<á declaración ambiental
Buffer $ .= '<'. substr ($ texto, $ i, $ konumK - $ i);

Se vostede non está dentro da etiqueta #
Else ()
#
$ Buffer .= substr ($ texto, $ i, $ konumK - $ i);
)

konumK $ i = $ + 1;
$ KonumK = strpos ($ texto, '<', $ i);
# Iniciar tag
$ Tag_mi = True;

# Se o carácter> antes rastlandiysa
# Ou> personaxe, pero el <carácter bulunamadiysa
konumB) elseif (($ konumB! == false & & $ konumK> $ konumB) | | ($ konumK === false & & $! == false)) (
# Icerisindeysek Tag
if ($ tag_mi) (
# Smoothed Engadir tag
$ Buffer .= guvenliTag (substr ($ texto, $ i, $ konumB - $ i));

# Tag Pechar
$ Tag_mi = False;

Se vostede non está dentro da etiqueta #
Else ()
Kodar comezar a parte # aquí
# E>> caracteres da declaración ambiental
$ Buffer .= substr ($ texto, $ i, $ konumB - $ i). '>';
)

$ I = $ konumB 1;
$ KonumB = strpos ($ texto, '>', $ i);

# Se rastlanmadiysa <ou> carácter
Else ()
# Icerisindeysek Tag
if ($ tag_mi) (
# Fin do común <carácter <a declaración ambiental
# E engadir texto para continuar o buffer
Buffer $ .= '<'. substr ($ texto, $ i);
Else ()
Desde o final do texto para continuar a posición acordada # engadir buffer
$ Buffer .= substr ($ texto, $ i);
)

# Agora tag acordo kalmadigina Dong et
break;
)
)

buffer de retorno $;
)

# ------------------------------------------------- -------------------------------------------------
función onDuzeltme ($ texto) (
''$ DegisiklikOncesi =;

# Debe ser mudado mentres eu sigo a abundancia de
while ($ degisiklikOncesi! = $ texto) (

DegisiklikOncesi $ = $ texto;

& # XX formato, algúns caracteres están escritos en ASCII cevriliyor karsiliklarina
# E o contido de algunhas etiquetas permiten atiliyor
$ Texto = preg_replace ('/ / Borrar ',' texto $);
$ Texto = preg_replace ('/ \ S ]+.*?< \> / cabeza / delete ',', $ texto);
$ Texto = preg_replace ('/ \ S ]+.*?< \ / script> / borrar','', $ texto);
$ Texto = preg_replace ('/ \ S ]+.*?< \ /> applet / borrar','', $ texto);
$ Texto = preg_replace ('/ \ S ]+.*?< \ / object> </ borrar','', $ texto);
$ Texto = preg_replace ('/ \ S ]+.*?< \ / frameset> / borrar','', $ texto);
$ Texto = preg_replace ('/ \ S ]+.*?< \ /> / iframe','', borrar $ texto);
$ Texto = preg_replace ('/ \ S ]+.*?< \ / title> / borrar','', $ texto);
$ Texto = preg_replace ('/
\ S ]+.*?< \ /> / estilo','', borrar $ texto);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 38 * 38 (?! []))|(&# 0-F-9A ;)|(&# x0 x0 * 26 * 26 (?! [0-9A-F])) / i ',' & ', $ texto);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 35 * 35 (?! []))|(&# 0-F-9A ;)|(&# x0 x0 * 23 * 23 (?! [0-9A-F])) / i ',' # ', $ texto);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 34 * 34 (?! []))|(&# 0-F-9A ;)|(&# x0 x0 * 22 * 22 (?! [0-9A-F])) / i "," texto ", $);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 39 * 39 (?! []))|(&# 0-F-9A ;)|(&# x0 x0 * 27 * 27 (?! [0-9A-F])) / i ',' \'', $ texto);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 60 * 60 (?! [0-9A-F ]))|(&# x0 x0 * * 3C 3C ;)|(&# (?! [0-9A-F])) / i ',' <'text, $);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 62 * 62 (?! [0-9A-F ]))|(&# x0 x0 * * 3E 3E ;)|(&# (?! [0-9A-F])) / i ','> 'text, $);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 58 * 58 (?! []))|(&# 0-F-9A ;)|(&# x0 x0 * * 3A 3A (?! [0-9A-F])) / i ',': 'text, $);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 47 * 47 (?! [0-9A-F ]))|(&# x0 x0 * * 2F 2F ;)|(&# (?! [0-9A-F])) / i ',' / ', $ texto);
('/(&# $ Texto = preg_replace ;)|(&# 0 0 * 61 * 61 (?! [0-9A-F ]))|(&# x0 x0 * * 3D 3D ;)|(&# (?! [0-9A-F])) / i ',' = 'text, $);
# $ Texto = preg_replace ('/(&# ;)|(&# 0 0 * 63 * 63 (?! [3f 0-F-9A ;)|(&# ]))|(&# x0 x0 * * 3f (?! [0-9A-F])) / i ','? 'text, $);
# $ Texto = preg_replace ('/(&# ;)|(&# 0 0 * 37 * 37 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * 25 * 25 (?!] [0-9A-F)) / i ','% ', $ texto);
# $ Texto = preg_replace ('/(&# ;)|(&# 0 0 * 46 * 46 (?! [0-9A-F ]))|(&# x0 x0 * * 2E ;)|(&# 2E (?! [0-9A-F])) / i ','. ', $ texto);
)

return $ texto;
)

# ------------------------------------------------- -------------------------------------------------
función guvenliTag ($ texto) (
global $ tagTablosu;
Slash $ = false;

# O último carácter / en
if (preg_match ('/ \ s \ /$/', $ texto)) (
$ Texto = substr ($ texto, 0, strlen ($ texto) -1);
Slash $ = true;
)

if (preg_match ('/^( \ /?)([^ \ s] *) \ s * $ / i ", $ texto, $ group) # ou ou formatindaysa
& &! ($ Grupos [1] & & $ slash) # á vez ou
& & Array_key_exists (strtolower ($ grupo [2]) tagTablosu, $)) (tag #, se tes R $ tagTablosu'nda
# 1 semellanzas, se hai, no baixo personaxe /
# 2 tag semellanza, dá

# formatindaysa
if ($ barra) (
$ Text = '<'. $ Grupos [2]. '/>';

# ou formatindaysa
Else ()
$ Text = '<'. $ Grupos [1]. $ Grupos [2]. '>';
)

return $ texto;

) Elseif (preg_match ('/([^ \ s] +) \ s eliminar *(.*)$/ ', $ texto, $ group) # formatindaysa
& & Array_key_exists (strtolower ($ grupo [1]) tagTablosu, $)) (tag #, se tes R $ tagTablosu'nda
# 1 similitude, tag
# 2 similitude, dá unha lista das instalacións
$ Text = '<'. $ Grupos [1];
GuvenliOzellikler $ texto .= ($ grupo [2], $ tagTablosu [strtolower ($ grupo [1 ])]);

if ($ barra) (
$ Texto .='/>';
Else ()
$ Texto .= '>';
)

return $ texto;
)

# Tag non válida. tag Freeze, no canto do espazo
#''Dondurmeyin ou falla de seguridade está composto de
''Retorno;
)

# ------------------------------------------------- -------------------------------------------------
función guvenliOzellikler ($ Instalacións, $ izin_verilenler) (
ozellikSablon global, $ ozellikTablosu, $ degerTablosu;

''Temp_ozellikler $ =;

# Características ou continuar en canto a propiedade valor = rastlandigi formatina
while (preg_match ($ ozellikSablon, comodidades $, $ grupos)) (

# 1 similitude, recurso ...
# 2 3. ou 4 similitude, o valor ...
# 5 similitude, dá unha lista das restantes instalacións
Facilidades $ = $ grupos [5];

# Este recurso permite a esta etiqueta características na lista ...
# Este recurso está na lista das normas de instalacións axeitadas de HTML ...
if (in_array (strtolower ($ grupo [1]) izin_verilenler, $) & & array_key_exists (strtolower ($ grupo [1]) ozellikTablosu, $)) (
# Se precisa deste recurso debe ter valor
if ($ ozellikTablosu [strtolower ($ grupo [1])]) (
# Valor sablona uymadigini e comprobar o cumprimento
preg_match ($ degerTablosu [$ ozellikTablosu [strtolower ($ grupo [1 ])]][ 0], $ grupo [2] | $ grupo [3] | $ grupo [4], $ grupo2);

# Sablona ten un grande valor se ...
# E sablonuna yasaklilar non caben ...
if ($ group2 [1] & &! preg_match ($ degerTablosu [$ ozellikTablosu [strtolower ($ grupo [1 ])]][ 1], $ grupo [2] | $ grupo [3] | $ grupo) [4]) (
valor do libro é # carácter ", se existe a posibilidade de
if ($ grupo [3]) (
# Formato Propiedade = "valor" record
''Temp_ozellikler $ .=. $ Grupos [1]. '= \''. $ Group2 [1]. '\'';

valor do libro é # "carácter ou susceptible de ser
Else ()
# Formato de gravación Propiedade = "valor"
''Temp_ozellikler $ .=. $ Grupos [1]. '='. $ Group2 [1] .'"';
)
)

# Este valor característico almamasi se é necesario ...
# E o valor dado kalkilmadiysa ...
) Elseif (! ($ Group [2] | | $ grupo [3] | | $ grupo [4])) (
# Feature é formato de gravación (por exemplo: persoas con discapacidade)
''Temp_ozellikler $ .=. $ Grupos [1];
)
)
)

return $ temp_ozellikler;
)

# ------------------------------------------------- -------------------------------------------------
guvenliGlobal función () (
global $ tagTablosu;
ozellikSablon global, $ ozellikTablosu, $ degerTablosu;

# Tag á lista de permitidos
As instalacións están permitidas para cada tag # array debe ser indicado en
TagTablosu $ array = (
forma de 'A' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' ',' coords "," destino "," tabindex ", accesskey ' , 'nome', href ',
"Hreflang ',' tipo ',' rel ',' rev ',' charset '),
"Abbr" => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Sigla' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Enderezo' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Espazo' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' nome ',' alt 'href', 'target', tabindex " , accesskey "," forma ",
'Coordenadas', 'usemap', 'nohref'),
'= B'> array ('id', 'class', 'title', 'estilo', dir ',' home '),
"BDO" => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Big' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
"Blockquote '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'cite'),
'Br' => array ('id', 'class', 'title', estilo ',' claro '),
'Button' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' nome ',' valor ',' tipo ', accesskey "," tabindex " )
'Caption' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
'Center' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
"Cite '=> array (' id ',' class ',' title ', estilo', 'dir', 'home'),
'Code' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Col' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar 'span', width ',' char ', charoff' "valign"),
"Colgroup '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'Aliñar', van ', width', 'char', charoff ' "valign"),
'DD' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Del' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' cite ',' datetime '),
"DFN '=> array (' id ',' class ',' title ', estilo', 'dir', 'home'),
'Div' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
«DL '=> array (' id ',' class ',' title ', estilo', 'dir', 'home'),
'DT' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'En' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
"Fieldset" => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' accesskey '),
'Fonte' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' tamaño ',' cor ',' cara '),
'H1' => array ('id', 'class', 'title', 'estilo', dir ',' home ',' align '),
"H2" => array ('id', 'class', 'title', 'estilo', dir ',' home ',' align '),
"H3" => array ('id', 'class', 'title', 'estilo', dir ',' home ',' align '),
'H4' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
'H5' => array ('id', 'class', 'title', 'estilo', dir ',' home ',' align '),
"H6" => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
'Hr' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' tamaño ', width', 'noshade'),
'I' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Img' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' src ',' longdesc ',' nome ', ismap " , usemap ', width', 'altura',
'Border', 'hspace "," vspace'),
'Input' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' alt ',' aceptar ',' readonly ',' deficientes ' , tabindex ',
'Accesskey', 'usemap, ismap', 'tipo', 'nome', 'valor', 'tamaño', 'maxlength', 'revisada', 'src'),
"Ins" => array ('id', 'class', 'title', estilo ',' dir ',' home ',' cite ',' datetime '),
"ISINDEX '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'aviso'),
"KDB '=> array (' id ',' class ',' title ', estilo', 'dir', 'home'),
'Label' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' accesskey ',' para '),
'Legend' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' accesskey '),
"Li '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'tipo', 'start', 'valor', 'compact'),
'Map' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' nome ',' alt 'href', 'target', tabindex " , accesskey "," forma ",
'Coordenadas', 'usemap', 'nohref'),
"NoFrames '=> array (' id ',' class ',' title ', estilo', 'dir', 'home'),
"Noscript '=> array (' id ',' class ',' title ', estilo', 'dir', 'home'),
'Ol' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' tipo ',' start ',' valor ',' compact ')
"OPTGROUP '=> array (' id ',' class ', título», «estilo», «dir', 'home', 'discapacitados', tabindex ',' nome ',' ti 'múltiples' , 'label'),
'Opción' => array ('id', 'class', 'title', 'estilo', dir ',' home ',' discapacitados ', tabindex', 'nome', 'tamaño', 'varios' , 'label'),
'P' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
'Vista' => array ('id', 'class', 'title', 'estilo', dir ',' home ',' width '),
'Q' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' cite '),
'S' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
"Samp" => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Select' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' nome ',' tamaño ', varios', 'discapacitados', tabindex " )
'Small' => array ('id', 'class', 'title', 'estilo', dir ',' home '),
"Span" => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar '),
'Strike' => array ('id', 'class', 'title', 'estilo', dir ',' home '),
'Forte' => array ('id', 'class', 'title', 'estilo', dir ',' home '),
'Sub' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Sup' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'Táboa' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' Aliñar ', resumo', ancho ',' bgcolor ', marco' "regras", a fronteira ',
"Cellspacing", "cellpadding"),
"Tbody" => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' char ', charoff', 'valign "),
'Td' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' bgcolor ',' align ',' char ', charoff', 'valign " , o ámbito "headers ',' ',
"Abbr ',' eixo ',' rowspan ',' colspan ',' nowrap ',' width ',' altura '),
"TEXTAREA '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'nome', 'liñas', 'cols', 'readonly', 'deficientes' , tabindex ',
'Accesskey'),
"TFOOT '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'align', 'char', charoff ',' valign"),
'Th' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' bgcolor ',' align ',' char ', charoff', 'valign " , o ámbito "headers ',' ',
"Abbr ',' eixo ',' rowspan ',' colspan ',' nowrap ',' width ',' altura '),
"Thead" => array ('id', 'class', 'title', estilo ',' dir ',' home ',' align ',' char ', charoff', 'valign "),
'Pt' => array ('id', 'class', 'title', estilo ',' dir ',' home ',' bgcolor ',' align ',' char ', charoff', 'valign " )
'TT' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
'U' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
«UL '=> array (' id ',' class ',' title ', estilo', 'dir', 'home', 'tipo', 'start', 'valor', 'compact'),
'Var' => array ('id', 'class', 'title', estilo ',' dir ',' home '),
);

Sablon lista de características e os valores dos códigos #
# Se o valor da propiedade almiyor só un conxunto dispoñible, yazilacak null
OzellikTablosu $ array = (
"Abbr" => texto ',
'Aceptar' => 'ContentType "
'Accesskey' => carácter ',
'Aliñar' CUSTOM_ALIGN => '
'Alt' => texto ',
"Axis CDATA => '
"Bgcolor '= Color>',
'Border' => 'pixels',
"Cellpadding '=> duración',
"Cellspacing" Length => ',
'Char' carácter => ',
"Charoff '=> duración',
'Charset' => carácter ',
"Checked" => null,
"Cite URI'=>',
'Clase' => 'CDATA "
'Clear' CUSTOM_CLEAR => '
'Cor' Color => ',
'Cols' => 'Número',
'Colspan' => 'Número',
'Compact' => null,
'Coordenadas' => 'coords "
"Datetime '= datetime>',
"Ruta" CUSTOM_DIR => '
"Discapacidades" => null,
'Face' CDATA => '
IDREF 'Para' => ',
"Marco" TFrame => '
"Os cabezallos '=>' IDREFS '
'Altura' => duración ',
'Href' => 'URI,
"Hreflang 'languagecode =>'
"Hspace '=>' pixels ',
'Id' ID = '>',
"Ismap" => null,
'Label' => texto ',
'Home' = languagecode> '
"Longdesc '=>' URI,
'Maxlength' número => ',
'Varios' => null,
'Nome' = CDATA> '
"Nohref" => null,
"Nohshade" => null,
'Sen quebras' => null,
"Prompt" texto => ',
"Readonly" => null,
"Rel '=>' LINKTYPES '
"Rev" LINKTYPES => '
'Liñas' => 'Número',
'Rowspan' => 'Número',
'Regras' => 'TRULES'
"Scope" Scope => ',
'Formulario' shape => ',
'Tamaño' => 'Número',
"Span '=>' Número ',
'Src' = URI '>' servidor '# non quere fóra da gosterilmesi imaxe' YEREL_URI 'será
'Start' NUMBER => ',
'Estilo' StyleSheet => '
"Resumo" => texto ',
"Tabindex '=>' Número de '
'Target' = CDATA> '
'Title' => texto ',
'Tipo' CUSTOM_TYPE => '
"'Usemap' '=>' URI,
"Valign" CUSTOM_VALIGN => '
'Valor' CDATA => '
"Vspace '=>' pixels ',
'Ancho' Length => ',
);

# O primeiro valor da matriz, o patrón debe uyulmasi
# O segundo valor da matriz, o estándar esixido define uyulmamasi
Se o estándar # uyulmamasi necesidade, "non hai datos", o '/ ^ \ s * $ / frase' no verán
# Valores para ser aceptado a observancia pattern'a en primeiro lugar, e outra é obrigatoria uymamasi
DegerTablosu $ array = (
"CDATA" => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # primeiro e \ último carácter non é calquera texto kosuluyla
'/ ^ \ S *$/'),
"Carácter" => array ('/ ^ s * \ ([\ w. ...........]) \ s * $ / i', # só un único carácter
'/ ^ \ S *$/'),
"Cor" => array ('/ ^ \ s *((?:#[ 0] 9abcdef (6 })|(?:[ \ w] +)) \ s * $ / i', # nome da cor ou código de formato ou cor # 000000
'/ ^ \ S *$/'),
"ContentType array '=> (' / ^ \ s *([^,]+.*[^ \ s] +) \ s * $ / i ', # lista separada de carácter
'/ ^ \ S *$/'),
"Coords array '=> (' / ^ s * \ ([0-9 \.] + [0-9 \., \ S] * [0-9 \.] +) \ S * $ / i", #, os caracteres e números separados por
'/ ^ \ S *$/'),
"CUSTOM_ALIGN '=> array (' / ^ \ s *((?: top )|(?: fondo )|(?: medio esquerdo )|(?: )|(?: centro-dereita )|(?:) | (?: xustificar a)) \ s * $ / i ",
'/ ^ \ S *$/'),
"CUSTOM_CLEAR '=> array (' / ^ \ s *((?: ningún )|(?: )|(?: todos )|(?: da esquerda á dereita)) \ s * $ / i",
'/ ^ \ S *$/'),
"CUSTOM_DIR '=> array (' / ^ \ s *((?: )|(?: LTR RTL)) \ s * $ / i",
'/ ^ \ S *$/'),
"CUSTOM_TYPE '=> array (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i", aínda que # CDATA
'/ ^ \ S *$/'),
"CUSTOM_VALIGN '=> array (' / ^ \ s *((?: top )|(?: )|(?: medio fondo inicial )|(?:)) \ s * $ / i",
'/ ^ \ S *$/'),
"Datetime" => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i ", aínda que # CDATA
'/ ^ \ S *$/'),
'ID' => array ('/ ^ s * \ ([a-za-Z] + [\ w \. \ -:]*) \ S * $ / i', # primeiro carácter debe ser letra
'/ ^ \ S *$/'),
"IDREF '=> array (' / ^ s * \ ([\ w \. \ -:]+) \ S * $ / i",
'/ ^ \ S *$/'),
"IDREFS array '=> (' / ^ s * \ ([\ w \. \ -: \ S] +) \ s * $ / i ', # separados por un espazo de lista IDREF
'/ ^ \ S *$/'),
"Languagecode '=> array (' / ^ s * \ ([a-za-Z] + [\ w \. \ -:]*) \ S * $ / i ', # ID
'/ ^ \ S *$/'),
'Length' => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i ", aínda que # CDATA
'/ ^ \ S *$/'),
"LINKTYPES array '=> (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i", aínda que # CDATA
'/ ^ \ S *$/'),
'Número' => array ('/ ^ s * \ ([0-9] +) \ s * $ / i', # debe ter polo menos un díxito
'/ ^ \ S *$/'),
'Pixels' => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i ", aínda que # CDATA
'/ ^ \ S *$/'),
"Scope" => array ('/ ^ \ s *((?: col )|(?: colgroup )|(?: liña )|(?: rowgroup)) \ s * $ / i ",
'/ ^ \ S *$/'),
'Formulario' => array ('/ ^ \ s *((?: círculo )|(?: rect poli )|(?: estándar )|(?:)) \ s * $ / i ",
'/ ^ \ S *$/'),
"StyleSheet '=> array (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i",

'/ ('. Declaracións # StyleSheet prohibida en
'Express [ii] a |'. # Expression
"SCR [ii] gl |". # Script
'&#|'. & #
'\ / \ * |'. # / *
'\ \ * /'. # * /
')/'),

'Texto' => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i ", aínda que # CDATA
'/ ^ \ S *$/'),
"TFrame '=> array (' / ^ \ s *((?: baleiro )|(?: anterior embaixo )|(?: )|(?: hsides )|(?: )|(?: lhs RHS) | (?: vsides )|(?: )|(?: caixa de fronteira)) \ s * $ / i ",
'/ ^ \ S *$/'),
"TRULES array '=> (' / ^ \ s *((?: ningún )|(?: liñas )|(?: cols grupos )|(?: )|(?: todos)) \ s * $ / i »
'/ ^ \ S *$/'),
"URI" => array ('/ ^ s * \ ([^ \ s] *) \ s * $ / i ",

'/ ('. # URI non se admite en expresións
'Express [ii] a |'. # Expression
"SCR [ii] gl | '. # Script
'&#|'. & #
'\ / \ * |'. # / *
'\ \ * /'. # * /
')/'),

"YEREL_URI '=> array (' / ^ * s \ ('. # Non aceptar conexións de fóra do servidor Apartamento URI
'((?: Http: \ / \ / '. Str_replace ('.',' \ \.' SERVER_NAME $ _SERVER ['']).' [^ \ S ]*)|'.
'(?:[^: \ S ]*))'.
') \ S * $ / i ",

'/ ('. # URI non se admite en expresións
'Express [ii] a |'. # Expression
"SCR [ii] gl | '. # Script
'&#|'. & #
'\ / \ * |'. # / *
'\ \ * /'. # * /
')/'),
);

# = Valor do inmoble "ou unha propiedade con vistas formatina Sablon
OzellikSablon $ = '/ ^ s * \ ([\ w ]+)(?: \ s *= \ s *(?:'.
'(?:"([^"]*)")|'. # "Valor" formato, o valor neste caso, "ser usado
\'(?:([^" \ 'S ,]*))|'. # Formato valor, o valor nesta situación ", eo espazo será utilizado
"(?: \ '(*] [^ \') \ ')'. # Formato 'Valor', neste caso os valores 'ser usado
'))? \ S ten *(.*)/';

return true;
)
?>

Pode deixar unha resposta , ou trackback do teu sitio web.

Deixe unha resposta