Conteúdo Html função PHP seguros

Sabado, março 28, 2009 2:43
Publicado na categoria Php

Lar função de limpeza para a entrada de html, mas mais testes etmedım gozukuor hos

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

função guvenliHtml ($ text) (
global $ start;
$ KonumK = 0; # <(Kucuktur) caracteres que temos visto, a última posição do
$ KonumB = 0; #> (büyüktür) caracteres que temos visto, a última posição do
Tag_mi $ = False; # tag dentro somos nós?
OzellikSablon $ = "; # = valor de característica é ser usado para chamadas global formatindaki
$ TagTablosu = array (); # informações de marca no alacagi global
$ OzellikTablosu = array (); # característica (atributo) informações no alacagi global
$ DegerTablosu = array (); # value () em informações alacagi global

# Variáveis globais definidas para valores
guvenliGlobal ();

# Texto antes do processo de yapılan Isle na correção
$ Text = onDuzeltme ($ texto);

$ I = 0;
$ Buffer = ";
$ Text konumK = strpos ($, '<', $ i); # <rastlandigi caráter primeira posição
KonumB $ = strpos ($ texto, '>', $ i); #> rastlandigi caráter primeira posição

# Verificar as tags de permitir que o texto dentro do nosso
while (True) (
# Rastlandiysa Se o caractere <, mais uma vez
# Ou <character encontrado but> bulunamadiysa caráter
if (($ konumK! konumK == false & & $ <$ konumB) | | ($ konumK! == false & & $ konumB === false)) (
# Icerisindeysek tag
if ($ tag_mi) (
# TAG em <olamayacagi para a parte tag sandigimiz
# Basindaki caractere <<para o cevre frase
$ Buffer .= '<'. texto substr ($, $ i, $ konumK - $ i);

# TAG dentro degilseniz
) Else (
#
$ Buffer .= substr texto ($, $ i, $ konumK - $ i);
)

$ I = $ konumK + 1;
$ Text konumK = strpos ($, '<', $ i);
# Tag Fixação
$ Tag_mi = True;

# Rastlandiysa Se o personagem>, mais uma vez
# Ou> personagem encontrado, mas <bulunamadiysa caráter
) Elseif (($ konumB! KonumK == false & & $> $ konumB) | | konumB ($ konumK === false & & $! == False)) (
# Icerisindeysek Tag
if ($ tag_mi) (
# Düzeltilmiş Adicionar tag
$ Buffer .= guvenliTag (substr (texto $, $ i, konumB $ - $ i));

# Tag Fechar
Tag_mi $ = False;

# TAG dentro degilseniz
) Else (
Obter a parte Kodar # aqui
# E> caracteres> a frase cevre
$ Buffer .= substr (texto $, $ i, konumB $ - $ i). '>';
)

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

# Se <ou> rastlanmadiysa caráter
) Else (
# Icerisindeysek Tag
if ($ tag_mi) (
# O personagem comum Última <<para o cevre frase
# E adicionar o Devamini buffer de texto
$ Buffer .= '<'. texto substr ($, $ i);
) Else (
# O final do texto da posição Devamini Kalina adicionar tampão
$ Buffer .= substr texto ($, $ i);
)

# Tag Cik artik kalmadigina gore Dong
break;
)
)

return $ buffer;
)

# ------------------------------------------------- -------------------------------------------------
função onDuzeltme ($ text) (
$ DegisiklikOncesi ='';

Necessário enquanto degistirilmesi bolum oldugu # continua
while ($ degisiklikOncesi! = $ texto) (

$ Text = $ degisiklikOncesi;

# & # Xx formato escrito alguns personagens, çevriliyor karsiliklarina ASCII
# Algumas tags permitem atiliyor e Conteúdos
$ Text = preg_replace ( '/ / Si ', ", $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / head> / si ', ", $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / script> / si','', $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / applet> / si','', $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / object> / si','', $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / frameset> / si','', $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / iframe> / si','', $ text);
$ Text = preg_replace ( '/ \ S ]+.*?< \ / title> / si','', $ text);
$ Text = preg_replace ( '/
\ S ]+.*?< \ / style> / si','', $ text);
('/(&# $ Text = preg_replace 0 * 38 ;)|(&# 0 * 38 (?! [0-9A-F ]))|(&# x0 * 26 ;)|(&# x0 * 26 (?! [0-9A-F])) / i ',' & ', $ texto);
0 * 35 text = preg_replace ('/(&# $ ;)|(&# 0 * 35 (?! [0-9A-F ]))|(&# x0 * 23 ;)|(&# x0 * 23 (?! [0-9A-F])) / # 'i', ', $ text);
('/(&# $ Text = preg_replace 0 * 34 ;)|(&# 0 * 34 (?! [0-9A-F ]))|(&# x0 * 22 ;)|(&# x0 * 22 (?! [0-9A-F])) / i ',' " ', $ texto);
('/(&# $ Text = preg_replace 0 * 39 ;)|(&# 0 * 39 (?! [0-9A-F ]))|(&# x0 * 27 ;)|(&# x0 * 27 (?! [0-9A-F])) / i ',' \'', $ text);
0 * 60 text = preg_replace ('/(&# $ ;)|(&# 0 * 60 (?! [0-9A-F ]))|(&# x0 * 3C ;)|(&# x0 * 3C (?! [0-9A-F])) / i ',' < ', $ text);
('/(&# $ Text = preg_replace 0 * 62 ;)|(&# 0 * 62 (?! [0-9A-F ]))|(&# x0 * 3E ;)|(&# x0 * 3E (?! [0-9A-F])) / i ','> ', $ text);
('/(&# $ Text = preg_replace 0 * 58 ;)|(&# 0 * 58 (?! [0-9A-F ]))|(&# x0 * 3A ;)|(&# x0 * 3A (?! [0-9A-F])) / i ',': ', $ text);
('/(&# $ Text = preg_replace 0 * 47 ;)|(&# 0 * 47 (?! [0-9A-F ]))|(&# x0 * 2F ;)|(&# x0 * 2F (?! [0-9A-F])) / i ',' / ', $ text);
('/(&# $ Text = preg_replace 0 * 61 ;)|(&# 0 * 61 (?! [0-9A-F ]))|(&# x0 * 3D ;)|(&# x0 * 3D (?! [0-9A-F])) / i ',' = ', $ texto);
0 * 63 $ text = preg_replace ('/(&# # ;)|(&# 0 * 63 (?! [0-9A-F ]))|(&# x0 * x0 * 3F ;)|(&# 3F (?! [0-9A-F])) / i ','? ", $ text);
0 * 37 $ text = preg_replace ('/(&# # ;)|(&# 0 * 37 (?! [0-9A-F ]))|(&# x0 * x0 * 25 ;)|(&# 25 (?! [0-9A-F])) / i ','% ', $ texto);
0 * 46 $ text = preg_replace ('/(&# # ;)|(&# 0 * 46 (?! [0-9A-F ]))|(&# x0 * x0 * 2E ;)|(&# 2E (?! [0-9A-F])) / i ','. ', $ text);
)

return $ texto;
)

# ------------------------------------------------- -------------------------------------------------
função guvenliTag ($ text) (
global $ tagTablosu;
$ Barra = False;

# O último caractere / no
if (preg_match ( '/ \ s \ /$/', $ texto)) (
$ Text = substr ($ texto, 0, strlen ($ texto) -1);
$ Barra = True;
)

if (preg_match ('/^( \ /?)([^ \ s] *) \ s * $ / i ', $ texto, $ grupo) # ou ou formatindaysa
& &! ($ Grupo [1] & & $ slash) # ao mesmo tempo ou
& & Array_key_exists (strtolower ($ grupo [2]), $ tagTablosu)) (tag #, se há $ tagTablosu'nda
# 1 semelhanças, se houver, no baixo / carácter
# 2 tag semelhança, dá

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

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

return $ texto;

) Elseif (preg_match ('/([^ \ s] +) \ s *(.*)$/ si ', texto $, $ group) # formatindaysa
& & Array_key_exists (strtolower ($ grupo [1]), $ tagTablosu)) (tag #, se há $ tagTablosu'nda
# 1 tag similaridade
# 2 similaridade dá uma lista das instalações
$ Text = '<'. $ Grupo [1];
guvenliOzellikler $ texto .= ($ grupo [2], tagTablosu $ [strtolower ($ grupo [1 ])]);

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

return $ texto;
)

# Tag inválido. Tag Freeze, em vez de 1 espaço
#''Dondurmeyin, ou falha de segurança consiste
return'';
)

# ------------------------------------------------- -------------------------------------------------
função guvenliOzellikler ($ aceites, izin_verilenler $) (
degerTablosu $ ozellikSablon, global $ ozellikTablosu, $;

$ Temp_ozellikler ='';

# Característica ou propriedade = valor continuar rastlandigi formatina enquanto
while (preg_match ozellikSablon ($, $ aceites, $ grupos)) (

# 1 semelhança, característica ...
# 2 3. ou 4 valor semelhança ...
# 5 similaridade, eo resto vai para lista
Aceita grupo $ = $ [5];

# Este recurso para esta tag na lista de permitidos para ...
# Este recurso está na lista dos padrões aceitos HTML apropriado ...
if (in_array (strtolower ($ grupo [1]), izin_verilenler $) & & array_key_exists (strtolower ($ grupo [1]), $ ozellikTablosu)) (
# Se você precisa deste valor incorporação recurso
if ($ ozellikTablosu [strtolower ($ grupo [1])]) (
# VALOR Šablona seleção seguiu uymadigini
preg_match (degerTablosu [$ ozellikTablosu [strtolower ($ grupo [1 ])]][ 0], $ grupo [2] | $ grupo [3] | $ grupo [4], $ grup2);

# Šablona valor adequado, se for encontrado ...
# E sablonuna yasaklilar não caber ...
if ($ grup2 [1] & &! preg_match (degerTablosu [$ ozellikTablosu [strtolower ($ grupo [1 ])]][ 1], $ grupo [2] | $ grupo [3] | $ grupo [4])) (
# Valor em caráter "é provável que aconteça se
if ($ grupo [3]) (
# Feature é = 'formato de registro de valor "
$ Temp_ozellikler .=''. $ Grupo [1]. '= \''. $ Grup2 [1]. '\'';

# Valor em caráter "não é provável
) Else (
# Feature é = "value" save format
$ Temp_ozellikler .=''. $ Grupo [1]. '= "'. $ Grup2 [1] .'"';
)
)

# Este recurso, almamasi valor preciso ...
# E o valor a ser administrado na kalkilmadiysa ...
) Elseif (! ($ Grupo [2] | | $ grupo [3] | | $ grupo [4])) (
# Feature é formato de gravação (ex: deficientes)
$ Temp_ozellikler .=''. $ Grupo [1];
)
)
)

return $ temp_ozellikler;
)

# ------------------------------------------------- -------------------------------------------------
guvenliGlobal função () (
global $ tagTablosu;
degerTablosu $ ozellikSablon, global $ ozellikTablosu, $;

# Lista de tags permitido permitir
# Autorizada Facilidades para cada marca, array devem ser especificados em
TagTablosu $ matriz = (
'a' => array ( 'id', 'forma' class ',' title ',' style ',' dir ',' homem ',' ',' coordenadas ',' target ',' tabindex, accesskey ' , 'nome', 'href',
"hreflang ',' tipo ',' rel ',' charset rev ',' '),
'abbr' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'sigla' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'address' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'área' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'nome', 'alt', 'href', 'target', 'tabindex' , a forma 'Accesskey', '',
'coordenadas', 'usemap', 'nohref'),
'b' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
"bdo '=> array (' id ',' class ',' title ',' style ',' dir ',' homem '),
'Big' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'blockquote' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'citar'),
'br' => array ( 'id', 'class', 'title', 'estilo', 'claro'),
'botão' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'nome', 'valor', 'tipo', 'accesskey', 'tabindex' )
'caption' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'center' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'citar' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'code' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'col' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'span', 'width', char ',' charoff ' , 'valign'),
'colgroup' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'span', 'width', char ',' charoff ' , 'valign'),
'dd' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'del' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'citar', 'datetime'),
'dfn' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'div' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'dl' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'dt' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'em' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'fieldset' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'accesskey'),
'font' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'tamanho', 'cor', 'cara'),
'H1' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'h2' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'h3' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'h4' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'H5' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'h6' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'hr' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'tamanho', 'width noshade', ''),
'i' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'img' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'src', 'longdesc', 'nome', 'ismap " , 'usemap', 'width', 'height',
'border', 'hspace', 'vspace'),
'input' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'alt', 'aceitar', 'readonly', 'disabled' , 'tabindex',
'accesskey', tamanho 'usemap', 'ismap', 'tipo', 'nome', 'valor', '', 'maxlength', 'checked', 'src'),
'ins' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'citar', 'datetime'),
'isindex' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'alerta'),
»KDB '=> array (' id ',' class ',' title ',' style ',' dir ',' homem '),
'label' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'accesskey', 'para'),
'legend' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'accesskey'),
'li' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'tipo', 'start', 'value', 'compact'),
'mapa' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'nome', 'alt', 'href', 'target', 'tabindex' , a forma 'Accesskey', '',
'coordenadas', 'usemap', 'nohref'),
"noframes '=> array (' id ',' class ',' title ',' style ',' dir ',' homem '),
'noscript' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'ol' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'tipo', 'start', 'value', 'compact'),
'optgroup' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'disabled', 'tabindex', vários 'nome', 'tamanho', '' , 'label'),
'option' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'disabled', 'tabindex', vários 'nome', 'tamanho', '' , 'label'),
'p' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'pre' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'width'),
'q' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'citar'),
's' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'samp' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'select' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'nome', 'tamanho', 'vários', 'disabled', 'tabindex' )
'pequeno' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'span' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align'),
'greve' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'forte' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'sub' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'sup' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'table' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'frame' resumo ',' width ',' bgcolor ',' ' , 'regras', 'border',
'cellspacing', 'cellpadding'),
'tbody' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'char', 'charoff', 'valign'),
'li' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'bgcolor', 'align', 'char', 'charoff', 'valign' , 'headers', 'scope',
'abbr', 'eixo', 'rowspan', 'colspan', 'nowrap', 'width height', ''),
'textarea' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'nome', 'linhas', 'cols', 'readonly', 'disabled' , 'tabindex',
'accesskey'),
'tfoot' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'char', 'charoff', 'valign'),
'th' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'bgcolor', 'align', 'char', 'charoff', 'valign' , 'headers', 'scope',
'abbr', 'eixo', 'rowspan', 'colspan', 'nowrap', 'width height', ''),
'thead' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'align', 'char', 'charoff', 'valign'),
'pt' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'bgcolor', 'align', 'char', 'charoff', 'valign' )
'tt' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'u' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
'ul' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem', 'tipo', 'start', 'value', 'compact'),
'var' => array ( 'id', 'class', 'title', 'style', 'dir', 'homem'),
);

# Lista özellikleri e modelo degerlerinin kodlari
# Se o valor da propriedade Almıyor apenas um conjunto disponível, Null yazılacak
OzellikTablosu $ matriz = (
'abbr' => 'Texto',
'aceitar' => 'ContentTypes',
'accesskey' => 'character',
'align' => 'CUSTOM_ALIGN',
'alt' => 'Texto',
'eixo' => 'CDATA ",
'bgcolor' => 'Color',
'border' => 'pixels',
'cellpadding' => 'Tamanho',
'cellspacing' => 'Tamanho',
'char' => 'character',
'charoff' => 'Tamanho',
'charset' => 'character',
'checked' => null,
'citar' => 'URI',
'class' => 'CDATA ",
'clear' => 'CUSTOM_CLEAR',
'cor' => 'Color',
'cols' => 'number',
'colspan' => 'number',
'compact' => null,
'coordenadas' => 'Coords',
'datetime' => 'DATETIME',
'dir' => 'CUSTOM_DIR',
'disabled' => null,
'cara' => 'CDATA ",
'para' => 'IDREF',
'frame' => 'TFrame',
'headers' => 'IDREFS',
'height' => 'Tamanho',
'href' => 'URI',
"hreflang '=>' languagecode ',
'hspace' => 'pixels',
'id' => 'ID',
"ismap '=> null,
'label' => 'Texto',
'homem' => 'languagecode',
'longdesc' => 'URI',
'maxlength' => 'number',
'multiple' => null,
'nome' => 'CDATA ",
'nohref' => null,
'nohshade' => null,
'nowrap' => null,
'alerta' => 'Texto',
'readonly' => null,
'rel' => 'LinkTypes',
'Rev' => 'LinkTypes',
'rows' => 'number',
'rowspan' => 'number',
'regras' => 'TRULES',
'scope' => 'scope',
'formato' => 'shape',
'tamanho' => 'number',
'span' => 'number',
'src' => 'URI', com excepção # servidor não quer fotos gösterilmesi 'YEREL_URI' vão
'start' => 'number',
'style' => 'stylesheet',
'resumo' => 'Texto',
'tabindex' => 'number',
'target' => 'CDATA ",
'title' => 'Texto',
'tipo' => 'CUSTOM_TYPE',
'usemap' => 'URI',
'valign' => 'CUSTOM_VALIGN',
'valor' => 'CDATA ",
'vspace' => 'pixels',
'width' => 'Tamanho',
);

# O índice do primeiro valor, o padrão exigido uyulmasi
# Directory, o segundo valor, o padrão exigido determina uyulmamasi
# Padrão uyulmamasi necessário não existe ", sem dados ', o' / ^ \ s * $ / 'Enter expressão
Para ser aceito no primeiro jogo pattern'a valor # e deve digerine uymamasi
DegerTablosu $ matriz = (
'CDATA' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # o primeiro eo último carácter \ não é qualquer texto kosuluyla
'/ ^ \ S *$/'),
'Caráter' => array ( '/ ^ \ s * ([\ w. ...........]) \ s * $ / i', # apenas um único caractere
'/ ^ \ S *$/'),
'Cor' => array ( '/ ^ \ s *((?:#[ 0-9abcdef] (6 })|(?:[ \ w] +)) \ s * $ / i', # nome da cor ou da # 000000 código de cores formato
'/ ^ \ S *$/'),
'ContentTypes' => array ( '/ ^ \ s *([^,]+.*[^ \ s,] +) \ s * $ / i', #, lista de caracteres separados por
'/ ^ \ S *$/'),
'Coords' => array ( '/ ^ \ s * ([0-9 \.] + [0-9 \., \ S] * [0-9 \.] +) \ S * $ / i', #, caracteres e números separados por
'/ ^ \ S *$/'),
'CUSTOM_ALIGN' => array ( '/ ^ \ s *((?: fundo )|(?: top )|(?: média esquerda )|(?: centro )|(?:) )|(?: direito | (?: justify)) \ s * $ / i ',
'/ ^ \ S *$/'),
'CUSTOM_CLEAR' => array ( '/ ^ \ s nenhum *((?: )|(?: todos )|(?: deixou )|(?: direita)) \ s * $ / i',
'/ ^ \ S *$/'),
'CUSTOM_DIR' => array ( '/ ^ \ s *((?: ltr rtl )|(?:)) \ s * $ / i',
'/ ^ \ S *$/'),
'CUSTOM_TYPE' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # CDATA com o mesmo
'/ ^ \ S *$/'),
'CUSTOM_VALIGN' => array ( '/ ^ \ s *((?: top )|(?: meio )|(?: fundo )|(?: base)) \ s * $ / i',
'/ ^ \ S *$/'),
'DATETIME' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # CDATA com o mesmo
'/ ^ \ S *$/'),
'ID' => array ( '/ ^ \ s * ([a-zA-Z] + [\ w \. \ -:]*) \ S * $ / i', # caráter primeira das cartas têm de ser
'/ ^ \ S *$/'),
'IDREF' => array ( '/ ^ \ s * ([\ w \. \ -:]+) \ S * $ / i',
'/ ^ \ S *$/'),
'IDREFS' => array ( '/ ^ \ s * ([\ w \. \ -: \ S] +) \ s * $ / i', # lista de espaços separados por um IDREF
'/ ^ \ S *$/'),
'Languagecode' => array ( '/ ^ \ s * ([a-zA-Z] + [\ w \. \ -:]*) \ S * $ / i', # ID
'/ ^ \ S *$/'),
'LENGTH' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # CDATA com o mesmo
'/ ^ \ S *$/'),
'LinkTypes' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # CDATA com o mesmo
'/ ^ \ S *$/'),
'Number' => array ( '/ ^ \ s * ([0-9] +) \ s * $ / i', # deve ser de pelo menos um dígito
'/ ^ \ S *$/'),
'Pixels' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # CDATA com o mesmo
'/ ^ \ S *$/'),
'Scope' => array ( '/ ^ \ s *((?: col )|(?: linha )|(?: colgroup rowgroup )|(?:)) \ s * $ / i',
'/ ^ \ S *$/'),
'Shape' => array ( '/ ^ \ s *((?: rect )|(?: poli )|(?: círculo )|(?: default)) \ s * $ / i',
'/ ^ \ S *$/'),
'Stylesheet' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i',

'/ ('. # StyleSheet é proibida nas expressões
'express [iI] a |'. Expressão #
'scr [iI] pt |'. # Script
'&#|'. # & #
'\ / \ * |'. # / *
'\ * \ /'. # * /
')/'),

'Text' => array ( '/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', # CDATA com o mesmo
'/ ^ \ S *$/'),
'TFrame' => array ( '/ ^ \ s *((?: void )|(?: acima )|(?: abaixo )|(?: hsides rhs )|(?: LHS )|(?:) | (?: vsides fronteira )|(?: )|(?: caixa)) \ s * $ / i ',
'/ ^ \ S *$/'),
'TRULES' => array ( '/ ^ \ s *((?: nenhum )|(?: grupos cols )|(?: linhas )|(?: todos )|(?:)) \ s * $ / i '
'/ ^ \ S *$/'),
'Uri' => array ( '/ ^ \ s * ([^ \ s] *) \ s * $ / i',

'/ ('. # URI é proibida nas expressões
'express [iI] a |'. Expressão #
'scr [iI] pt |'. # Script
'&#|'. # & #
'\ / \ * |'. # / *
'\ * \ /'. # * /
')/'),

'YEREL_URI' => array ( '/ ^ \ s * ('. Bulunduğu # servidor não aceita que não seja link URI
'((?: Http: \ / \ / 'str_replace. ('.',' \ \.', $ _SERVER [ 'SERVER_NAME']).' [^ \ s ]*)|'.
'(?:[^: \ S ]*))'.
') \ S * $ / i',

'/ ('. # URI é proibida nas expressões
'express [iI] a |'. Expressão #
'scr [iI] pt |'. # Script
'&#|'. # & #
'\ / \ * |'. # / *
'\ * \ /'. # * /
')/'),
);

# Feature é = "valor" ou recurso de modelo ministro formatina
OzellikSablon $ = '/ ^ \ s * ([]+)(?: w \ \ s *= \ s *(?:'.
'(?:"([^"]*)")|'. # "Valor" formato, neste caso em valor "ser utilizado
'(?:([^" \ '\' S ,]*))|'. # formato do valor, o valor nessa situação ", eo espaçamento ser utilizado
'(?: \' ([^ \ "] *) \ ')'. # Formato 'Valor', neste caso o valor em 'ser usado
'))? \ S *(.*)/ si';

return true;
)
?>

Você pode deixar uma resposta, ou trackback de seu próprio site.

Deixe uma Resposta