PHP completely filters HTML, JS, CSS and other tags

time:15-02-25 forum:PHP tools and code
  http://www.jb51.net/article/17106.htm

php valid filter HTML tags. .lt; /script.gt; @is.quot;.Quot;.Quot; $str);
$str = preg_replace (.Quot; @.lt; iframe). T;.Quot; $str);
.Gt;
[/code]
all the regular filter HTML tags, but today it's not good to use. Why? Is the label turn away. For example.Lt; br.Gt; the page shows this. But the source file shows like this: "but we can still handle it, first reverse the content. .
code as follows:
[code]$str= htmlspecialchars_decode ($str); [/code]

the function of htmlspecialchars_decode is to turn the source file into.Lt;.Gt; such a label. Quot; $str); [/code]

prev:American couples ski themes, weddings, s... next:Qingdao citizens peel orange and dye the...
post comment
Notice



approved   How much do you know about the histo...   The inheritance of the old Ji'nan ha...   Do not belittle those street cars, t...   South Korea's chief mother is popula...   The 3 year old was elected the young...
rand   PHP extraction of Chinese characters...   Code to crack burglar chain by forgi...   Error syntax error, unexpected T_ENC...   PHP simulation post submit data, can...   PHP methods to prevent repeated subm...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com