HTML-Inhalte, sichere PHP-Funktion

Samstag, 28 März, 2009 2.43
Geschrieben in der Kategorie PHP

Html-Eingang für S-Reinigungs-Funktion, aber so ziemlich der Test etmedım gozukuor

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

guvenliHtml Funktion ($ text) (
global $ ab;
KonumK $ = 0; # <wurden (siehe unten), wir gesehen haben, die endgültige Position des Zeichens
KonumB $ = 0; #> (Buyuktur) haben wir gesehen, die endgültige Position des Zeichens
$ Tag_mi = False; # tag in dir?
OzellikSablon $ = "# property = Wert für die weltweite Anrufe genutzt werden formatindaki
$ TagTablosu = array (); # Tag-Informationen, ersetzen globalen alacagi
$ OzellikTablosu = array (); # Merkmal (Attribut) Informationen über die Lage der globalen alacagi
DegerTablosu $ = array (); # Wert (Value), der globalen Informationsgesellschaft Raum alacagi

# Globale Variablen auf Werte
guvenliGlobal ();

# Text-Verarbeitung auf die Korrektur Prozess gemacht wird, bevor
$ Text = onDuzeltme ($ text);

$ I = 0;
$ Buffer = ";
$ KonumK = strpos ($ text, '<', $ i); # <Charakter in der ersten Position rastlandigi
$ KonumB = strpos ($ text, '>', $ i), #> Zeichen in der ersten Position rastlandigi

# Scan der Text innerhalb des Tags zu
while (true) (
# Wenn das <Zeichen vor rastlandiysa
# Oder <characters wurden found, but> Charakter bulunamadiysa
if (($ konumK! == false & & $ konumK <$ konumB) | | ($ konumK! == false & & $ konumB === false)) (
# Tag icerisindeysek
wenn ($ tag_mi) (
# Tag in <olamayacagi für das Tag "Teil sandigimiz
# Basindaki Zeichen <<, um die Umwelterklärung
$ Buffer .= '<'. substr ($ text, $ i, $ konumK - $ i);

Wenn Sie nicht innerhalb von # tag
Else ()
#
$ Buffer .= substr ($ text, $ i, $ konumK - $ i);
)

$ I = $ konumK + 1;
$ KonumK = strpos ($ text, '<', $ i)
# Start-Tag
$ Tag_mi = True;

# Wenn das> Zeichen vor rastlandiysa
# Oder> Charakter, aber er <Charakter bulunamadiysa
) Elseif (($ konumB! == False & & $ konumK> $ konumB) | | ($ konumK === false & & $ konumB! == False)) (
# Tag icerisindeysek
if ($ tag_mi) (
# Smoothed Tag hinzufügen
$ Buffer .= guvenliTag (substr ($ text, $ i, $ konumB - $ i));

# Close tag
$ Tag_mi = False;

Wenn Sie nicht innerhalb von # tag
Else ()
Kodar Holen Sie sich das Teil hier #
# Und> Zeichen der Umwelterklärung>
$ Buffer .= substr ($ text, $ i, $ konumB - $ i). '';
)

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

# Wenn <oder> Charakter rastlanmadiysa
Else ()
# Tag icerisindeysek
if ($ tag_mi) (
# Ende der gemeinsamen Zeichen <<, um die Umwelterklärung
# Buffer und fügen Sie Text, weiterhin die
$ Buffer .= '<'. substr ($ text, $ i);
Else ()
Seit dem Ende des Textes, weiterhin die vereinbarten Position # Puffer hinzufügen
$ Buffer .= substr ($ text, $ i);
)

# Jetzt tag nach kalmadigina Dong et
break;
)
)

return $ buffer;
)

# ------------------------------------------------- -------------------------------------------------
onDuzeltme Funktion ($ text) (
$ DegisiklikOncesi ='';

# Sollte so lange wie ich viel von zu halten verändert werden
while ($ degisiklikOncesi! = $ text) (

$ DegisiklikOncesi = $ text;

# & # Xx-Format, werden einige Zeichen in ASCII karsiliklarina cevriliyor geschrieben
# Und der Inhalt einiger Tags erlauben atiliyor
$ Text = preg_replace ('/ / Löschen ',', $ text);
$ Text = preg_replace ('/ \ S ]+.*?< \ / head> / delete ',', $ text);
$ Text = preg_replace ('/ \ S ]+.*?< \ / script> / löschen','', $ text);
$ Text = preg_replace ('/ \ S ]+.*?< \ / applet> / löschen','', $ text);
$ Text = preg_replace ('/ \ S ]+.*?< \ / object> / löschen','', $ text);
$ Text = preg_replace ('/ Als \ s ]+.*?< \ / frameset> / löschen ",'', $ text);
$ Text = preg_replace ('/ \ S ]+.*?< \ / iframe> / löschen','', $ text);
$ Text = preg_replace ('/ \ S ]+.*?< \ / title> / löschen','', $ text);
$ Text = preg_replace ("/
\ S ]+.*?< \ / style> / löschen','', $ text);
Text = preg_replace ('/(&# ;)|(&# $ 0 * 38 0 * 38 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * * 26 26 (?! [0-9A-F])) / i ',' & ', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 35 * 35 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * 23 * 23 (?! [0-9A-F])) / i ',' # ', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 34 * 34 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * 22 * 22 (?! [0-9A-F])) / i ',' "', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 39 * 39 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * 27 * 27 (?! [0-9A-F])) / i ',' \'', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 60 * 60 (?! [0-9A-F ]))|(&# x0 x0 * * 3C 3C ;)|(&# (?! [0-9A-F])) / i ',' <', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 62 * 62 (?! [0-9A-F ]))|(&# x0 x0 * * 3E 3E ;)|(&# (?! [0-9A-F])) / i ','> ', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 58 * 58 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * * 3A 3A (?! [0-9A-F])) / i ',': ', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 47 * 47 (?! [0-9A-F ]))|(&# x0 x0 * * 2F 2F ;)|(&# (?! [0-9a-f])) / i ',' / ', $ text);
$ Text = preg_replace ('/(&# ;)|(&# 0 0 * 61 * 61 (?! [0-9a-F ]))|(&# x0 x0 * * 3D 3D ;)|(&# (?! [0-9A-F])) / i ',' = ', $ text);
# $ Text = preg_replace ('/(&# ;)|(&# 0 0 * 63 * 63 (?! [0-9A-F 3F ;)|(&# ]))|(&# x0 x0 * * 3F (?! [0-9A-F])) / i ','? ', $ text);
# $ Text = preg_replace ('/(&# ;)|(&# 0 0 * 37 * 37 (?! [0-9A-F ]))|(&# ;)|(&# x0 x0 * * 25 25 (?! [0-9A-F])) / i ','% ', $ text);
# $ Text = preg_replace ('/(&# ;)|(&# 0 0 * 46 * 46 (?! [0-9A-F ]))|(&# x0 x0 * * 2E ;)|(&# 2E (?! [0-9A-F])) / i ','. '$ text);
)

return $ text;
)

# ------------------------------------------------- -------------------------------------------------
guvenliTag Funktion ($ text) (
global $ tagTablosu;
Slash $ = false;

# Das letzte Zeichen / in
if (preg_match ('/ \ s \ /$/', $ text)) (
$ Text = substr ($ text, 0 strlen ($ text) -1);
Slash $ = true;
)

if (preg_match ('/^( \ /?)([^ \ s] *) \ s * $ / i ', $ text, $ group) # oder oder formatindaysa
& &! ($ Gruppen [1] & & $ Schrägstrich) # zur gleichen Zeit oder
Array_key_exists & & (strtolower ($ group [2]), $ tagTablosu)) (# tag, wenn Sie $ tagTablosu'nda haben
# 1 Ähnlichkeiten, wenn überhaupt, am Bass / Charakter
# 2 Ähnlichkeit, tag gibt

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

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

return $ text;

) Elseif (preg_match ('/([^ \ s] /) \ *(.*)$/ delete 's, $ text, $ group) # formatindaysa
& & Array_key_exists (strtolower ($ group [1]), $ tagTablosu)) (# tag, wenn Sie $ tagTablosu'nda
# 1 Ähnlichkeit, tag
# 2 Ähnlichkeit, gibt eine Liste der Einrichtungen
$ Text = '<'. $ Gruppen [1];
GuvenliOzellikler $ text .= ($ group [2], $ tagTablosu [strtolower ($ group [1 ])]);

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

return $ text;
)

# Invalid tag. Freeze-Tag anstelle von einem Raum
#''Dondurmeyin oder Sicherheit Loch bestehend aus
Rückkehr'';
)

# ------------------------------------------------- -------------------------------------------------
guvenliOzellikler Funktion ($ Einrichtungen, $ izin_verilenler) (
global $ ozellikSablon, ozellikTablosu $, $ degerTablosu;

$ Temp_ozellikler ='';

# Features oder so lange, wie property = value formatina rastlandigi
while (preg_match ($ ozellikSablon, $ Einrichtungen, Gruppen $)) (

# 1 Ähnlichkeit, Funktion ...
# 2 3. oder 4 Ähnlichkeit, der Wert ...
# 5 Ähnlichkeit, enthält eine Liste der übrigen Einrichtungen
$ $ = Einrichtungen Gruppen [5];

# Die Funktion für diesen Tag ist in die Liste der zugelassenen Einrichtungen ...
# Dieses Feature ist in HTML-Standards, um eine entsprechende Liste der Einrichtungen ...
if (in_array (strtolower ($ group [1]), $ izin_verilenler) & & array_key_exists (strtolower ($ group [1]), $ ozellikTablosu)) (
# Wenn Sie dieses Feature benötigen, sollten Sie Wert
if ($ ozellikTablosu [strtolower ($ group [1])]) (
# WERT uymadigini sablona und Kontrolle der Einhaltung
preg_match ($ degerTablosu [$ ozellikTablosu [strtolower ($ group [1 ])]][ 0], $ group [2] | $ group [3] | $ group [4], $ Gruppe2);

# Sablona hat großen Wert, wenn ...
# Und yasaklilar sablonuna nicht fit ...
if ($ group2 [1] & &! preg_match ($ degerTablosu [$ ozellikTablosu [strtolower ($-Gruppen [1 ])]][ 1], $ group [2] | $ group [drei] | $ group [4])) (
# Buchwert ", wenn der Charakter wird wahrscheinlich
if ($ group [3]) (
# Property = 'value' Satzformat
$ Temp_ozellikler .=''. $ Gruppen [1]. '= \''. Gruppe2 $ [1]. '\'';

Buchwert # "-Zeichen oder möglicherweise
Else ()
# Eigenschaft = "Wert" Aufnahmeformat
$ Temp_ozellikler .=''. $ Gruppen [1]. '=' ". $ Gruppe2 [1] .'"';
)
)

Dieses Feature # Wert almamasi wenn nötig ...
# Und der Wert gegeben kalkilmadiysa ...
) Elseif (! ($ Group [2] | | $ group [3] | | $ group [4])) (
# Feature ist der Aufnahme-Format (z. B.: deaktiviert)
$ Temp_ozellikler .=''. $ Gruppen [1];
)
)
)

return $ temp_ozellikler;
)

# ------------------------------------------------- -------------------------------------------------
guvenliGlobal Funktion () (
global $ tagTablosu;
global $ ozellikSablon, ozellikTablosu $, $ degerTablosu;

# Liste der erlaubten Tags erlauben
Die Einrichtungen sind für jeden tag # Arrays muss angegeben werden, dürfen in
$ TagTablosu = array (
'A' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Gestalt', 'coords', 'Ziel', 'tabindex', 'accesskey " , 'name', 'href',
"Hreflang ',' Typ ',' rel ',' rev ',' charset '),
"Abk. '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann '),
"Abkürzung" => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Adresse' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Umgebung' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'name', Alt '', 'href', 'Ziel', 'tabindex' "accesskey ',' Form ',
'Koordinaten', 'usemap', 'nohref'),
'B' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
"BDO '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann '),
'Big' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
"Blockquote '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann ',' nennen '),
'Br' => array ('id', 'class', 'title', 'style', 'clear'),
'Button' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Name', 'Wert', 'Typ', 'accesskey', 'tabindex' )
'Caption' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
'Center' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
"Cite '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann '),
'Code' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Col' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'span', 'width', 'char', 'charoff " "valign '),
"COLGROUP '=> array (' id ',' class ',' title 'Stil', 'dir', 'Mann', 'Ausrichten', 'span', 'width', 'char', 'charoff" "valign '),
'Dd' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Del' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'nennen', 'datetime'),
"DFN '=> array (" id', 'class', 'title', 'style', 'dir', 'Mann'),
'Div' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
'DL' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Dt' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Em' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
"Fieldset '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann ',' Ausrichten ',' accesskey '),
'Font' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Größe', 'Farbe', 'Gesicht'),
"H1" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
'H2' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
"H3" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
"H4" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
"H5" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
"H6" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
"HR" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'Größe', 'width', 'noshade'),
'I' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'IMG' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'src', 'longdesc', 'Name', 'ISMAP " "usemap ',' width ',' height ',
'Border', 'hspace', 'vspace'),
'Input' => array ('id', 'class', 'title' Stil ',' dir ',' Mann ',' Ausrichten ',' alt ',' annehmen ',' readonly ',' Behinderte ' "tabindex"
'Accesskey', 'usemap', 'ISMAP', 'Typ', 'name', 'Wert', 'Größe', 'maxlength', 'markiert', 'src'),
'Ins' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'nennen', 'datetime'),
"Isindex '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann ',' prompt '),
"KDB '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann '),
'Label' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'accesskey', 'für'),
'Legend' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'accesskey'),
'Li' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'type', 'start', 'Wert', 'compact'),
"Karte" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'name', Alt '', 'href', 'Ziel', 'tabindex' "accesskey ',' Form ',
'Koordinaten', 'usemap', 'nohref'),
"NoFrames '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann '),
"Noscript '=> array (" id', 'class', 'title', 'style', 'dir', 'Mann'),
"Ol '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann ',' type ',' start ',' Wert ',' compact '),
"OPTGROUP '=> array (' id 'Klasse', 'title', 'Stil' dir ',' Mann ',' deaktiviert ',' tabindex ',' Name ',' Größe ',' mehrere ' , 'label'),
'Option' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'deaktiviert', 'tabindex', 'Name', 'Größe', 'mehrere' , 'label'),
'P' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
'Pre' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'width'),
'Q' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'nennen')
'S' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
"SAMP '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann '),
'Select' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Name', 'Größe', 'mehrere', 'deaktiviert', 'tabindex' )
'Small' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
"Span" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten'),
'Strike' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Strong' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Sub' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'SUP' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Table' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'Zusammenfassung', 'width', 'bgcolor', 'Frame' 'rules', 'Grenze',
"Cellspacing ',' cellpadding '),
'Tbody' => array ('id', 'Klasse', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'char', 'charoff', 'valign'),
'TD' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'bgcolor' align ',' char ',' charoff ',' valign ' "Header" Umfang ",
"Abk. ',' Achse ',' rowspan ',' colspan ',' nowrap ',' width ',' height '),
'Textarea' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Name', 'Zeilen', 'cols', 'readonly', 'Behinderte' "tabindex"
'Accesskey'),
"TFOOT '=> array (' id ',' class ',' title ',' style ',' dir ',' Mann ',' Ausrichten ',' char ',' charoff ',' valign '),
'Th' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'bgcolor', 'Ausrichten', 'char', 'charoff', 'valign' "Header", "Umfang",
"Abk. ',' Achse ',' rowspan ',' colspan ',' nowrap ',' width ',' height '),
"Gewinde" => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'Ausrichten', 'char', 'charoff', 'valign'),
'De' => array ('id', 'class', 'title', 'style', 'dir', 'Mann', 'bgcolor', 'Ausrichten', 'char', 'charoff', 'valign' )
'TT' => array ("id ',' class ',' title ',' style ',' dir ',' Mann '),
'U' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
'Ul' => array ('id', 'class', 'title' Stil ',' dir ',' Mann ',' Typ ',' start ',' Wert ',' compact '),
'Var' => array ('id', 'class', 'title', 'style', 'dir', 'Mann'),
);

Sablon's Features-Liste, und die Werte der #-Codes
# Wenn der Eigenschaftswert almiyor nur eingestellt, Null yazilacak
$ OzellikTablosu = array (
"Abk. '=>' Text ',
'Accept' => 'ContentTypes "
'Accesskey' => 'Zeichen',
'Ausrichten' => 'CUSTOM_ALIGN "
'Alt' => 'Text',
'Axis' => 'CDATA'
"Bgcolor '=>' Color ',
'Border' => 'Pixel',
"Cellpadding '=>" Länge ",
"Cellspacing '=>" Länge ",
'Char' => 'Zeichen',
"CHAROFF '=>" Länge "
'Charset' => 'Zeichen',
"Checked '=> null,
"Cite '=>' URI"
'Klasse' => 'CDATA'
'Clear' => 'CUSTOM_CLEAR "
'Color' => 'Color',
'Cols' => 'Zahl',
'Colspan' => 'Zahl'
'Compact' => null,
'Koordinaten' => 'COORDS "
"Datetime" => "DATETIME"
'Dir' => 'CUSTOM_DIR "
'Disabled' => null,
'Face' => 'CDATA'
"Für '=>' IDREF"
'Frame' => 'TFRAME "
"Headers '=>' IDREFS"
"Höhe" => "Länge",
'Href' => 'URI "
"Hreflang '=>' LANGUAGECODE"
"Hspace '=>' Pixel ',
'Id' => 'ID',
"ISMAP '=> null,
'Label' => 'Text',
'Man' => 'LANGUAGECODE "
"Longdesc '=>' URI"
"MaxLength '=>' Zahl ',
'Multiple' => null,
'Name' => "CDATA"
"Nohref '=> null,
"Nohshade '=> null,
'Nowrap' => null,
"Eingabeaufforderung" => 'Text',
"Readonly '=> null,
'Rel' => 'LinkTypes "
"Rev '=>' LinkTypes"
'Rows' => 'Zahl',
'Rowspan' => 'Zahl',
'Rules' => 'TRULES "
'Scope' => 'Scope',
'Shape' => 'SHAPE',
'Größe' => 'Zahl',
'Div' => 'Zahl',
'Src' => 'URI', '# Server nicht außerhalb des Bildes gosterilmesi "YEREL_URI" werden wollen
'Start' => 'Zahl',
'Style' => 'StyleSheet "
"Zusammenfassung" => 'Text',
"Tabindex '=>' Zahl ',
'Target' => 'CDATA'
'Title' => 'Text',
'Type' => 'CUSTOM_TYPE "
"Usemap '=>' URI"
"Valign '=>' CUSTOM_VALIGN"
'Value' => 'CDATA'
"Vspace '=>' Pixel ',
"Breite" => "Länge",
);

# Der erste Wert des Arrays, sollte das Muster uyulmasi
# Der zweite Wert des Arrays, setzt die erforderlichen Muster uyulmamasi
Wenn das Muster # uyulmamasi müssen, bedeutet "keine Daten" die "/ ^ \ s * $ / Phrase 'im Sommer
# Werte zum ersten pattern'a Einhaltung akzeptiert werden, und andere ist obligatorisch uymamasi
$ DegerTablosu = array (
'CDATA' => array ('/ ^ \ s *(.*[^ \ s] +) \ s * / $ i', # erste und letzte Zeichen \ s keinen Text kosuluyla
"/ ^ \ S *$/'),
'Charakter' => array ('/ ^ \ s * ([\ w. ...........]) \ s * $ / i', # nur ein einzelnes Zeichen
"/ ^ \ S *$/'),
'Color' => array ('/ ^ \ s 0-9abcdef] (6 })|(?:[ \ w] +)) \ s * $ / i' *((?:#[, # Farbname oder Format Farbcode # 000000 oder
"/ ^ \ S *$/'),
"ContentTypes '=> array (' / ^ \ als \ s,] + s *([^,]+.*[^) \ s * $ / i ', #, eine Liste von Zeichen, getrennt durch
"/ ^ \ S *$/'),
"COORDS '=> array (' / ^ \ s * ([0-9 \.] + [0-9 \. \ S] * [0-9 \.] +) \ S * $ / i ', #, Zeichen und Zahlen, getrennt durch
'/ ^ \ *$/'), S
"CUSTOM_ALIGN '=> array (' / ^ \ s top )|(?: )|(?: unteren linken Mittelfinger *((?: )|(?: )|(?: )|(?: Mitte rechts) | (? rechtfertigen:)) \ s * $ / i ',
"/ ^ \ S *$/'),
"CUSTOM_CLEAR '=> array (' / ^ \ s *((?: none )|(?: )|(?: alle )|(?: links nach rechts)) \ s * $ / i ',
'/ ^ "\ S *$/'),
"CUSTOM_DIR '=> array (' / ^ \ s *((?: )|(?: ltr rtl)) \ s * $ / i ',
"/ ^ \ S *$/'),
"CUSTOM_TYPE '=> array (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i ', wie CDATA #
"/ ^ \ S *$/'),
"CUSTOM_VALIGN '=> array (' / ^ \ s top )|(?: )|(?: Mitte Unten Grundlinie )|(?:)) \ *((?: s * $ / i ',
"/ ^ \ S *$/'),
"DATETIME '=> array (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i ', wie CDATA #
"/ ^ \ S *$/'),
'ID' => array ('/ ^ \ s * ([a-zA-Z] + [\ w \. \ -:]*) \ S * $ / i', # erste Zeichen muss Buchstabe sein
"/ ^ \ S *$/'),
'IDREF' => array ('/ ^ \ s * ([\ w \. \ -:]+) \ S * $ / i',
"/ ^ \ S *$/'),
"IDREFS '=> array (' / ^ \ s * ([\ w \. \ - \ S] +) \ s * $ / i ', # durch ein Leerzeichen getrennt von IDREF Liste
"/ ^ \ S *$/'),
"LANGUAGECODE '=> array (' / ^ \ s * ([a-zA-Z] + [\ w \. \ -:]*) \ S * $ / i ', # ID
"/ ^ \ S *$/'),
"Länge" => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', wie CDATA #
"/ ^ \ S *$/'),
"LinkTypes '=> array (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i ', wie CDATA #
"/ ^ \ S *$/'),
"NUMBER" => Array ('/ ^ \ s * ([0-9] +) \ s * $ / i', # muss für mindestens eine Ziffer
"/ ^ \ S *$/'),
'Pixel' => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', wie CDATA #
"/ ^ \ S *$/'),
'Scope' => array ('/ ^ \ s *((?: )|(?: col colgroup Zeile )|(?: )|(?: rowgroup)) \ s * $ / i'
"/ ^ \ S *$/'),
'SHAPE' => array ('/ ^ \ s *((?: )|(?: rect Kreis Poly )|(?: )|(?: default)) \ s * $ / i',
"/ ^ \ S *$/'),
"StyleSheet '=> array (' / ^ \ s *(.*[^ \ s] +) \ s * $ / i ',

'/ ('. # StyleSheet Aussagen sind unzulässig, in
'Express [ii] auf |'. # Expression
"Scr [ii] pt |". # Script
'&#|'. # & #
'\ / \ * |'. # / *
'\ * \ /'. # * /
')/'),

'TEXT' => array ('/ ^ \ s *(.*[^ \ s] +) \ s * $ / i', wie CDATA #
"/ ^ \ S *$/'),
"TFRAME '=> array (' / ^ \ s *((?: )|(?: void oben unten )|(?: )|(?: hsides )|(?: )|(?: LHS RHS) | (?: vsides )|(?: )|(?: box Grenze)) \ s * $ / i ',
'/' ^ \ S *$/'),
"TRULES '=> array (' / ^ \ s *((?: none )|(?: )|(?: Gruppen Zeilen cols )|(?: )|(?: alle)) \ s * $ / i "
"/ ^ \ S *$/'),
"URI '=> array (' / ^ \ s * ([^ \ s] *) \ s * $ / i ',

'/ ('. # URI ist nicht in Ausdrücken erlaubt
'Express [ii] auf |'. # Expression
"Scr [ii] pt |". # Script
'&#|'. # & #
'\ / \ * |'. # / *
'\ * \ /'. # * /
')/'),

"YEREL_URI '=> array (' / ^ \ s * ('. # Akzeptieren keine Links außerhalb der Wohnung Server URI
'((?: Http: \ / \ / '. Str_replace ('.',' \ \.', S $ _SERVER ['SERVER_NAME']).' [^ \ ]*)|'.
'(?:[^: \ S ]*))'.
') \ S * $ / i',

'/ ('. # URI ist nicht in Ausdrücken erlaubt
'Express [ii] auf |'. # Expression
"Scr [ii] pt |". # Script
'&#|'. # & #
'\ / \ * |'. # / *
'\ * \ /'. # * /
')/'),
);

# Eigenschaft = "Wert" oder eine Unterkunft mit Blick auf formatina Sablon
OzellikSablon $ = "/ ^ \ s * ([\ w ]+)(?: \ s *= \ s *(?:'.
'(?:"([^"]*)")|'. # "Value"-Format, wird der Wert in diesem Fall "verwendet werden
'(?:([^" \ '\ S ,]*))|'. # Format Wert, der Wert in dieser Situation ", und der Raum genutzt werden
"(?: \ '([^ \"] *) \') '. # 'Value'-Format, in diesem Fall die Werte 'verwendet werden
'))? \ S haben *(.*)/';

return true;
)
?>

Du kannst Antwort hinterlassen , oder trackback von deiner eigenen Seite.

Lassen Sie eine Antwort