Php regular expression problem eregi_replace (& quot; & lt; (iframe | script) [^ & gt;] + & gt; & quot;, & quot ;) can this replace malicious code? Php regular expression problem eregi_replace (& quot; & lt; (iframe | script) [^ & gt;] + & gt; & quot;, & quot ;) in this way, can the malicious code be replaced by the php regular expression problem eregi_replace ("<(iframe | script) [^>] +>?
Php regular expression problem eregi_replace ("<(iframe | script) [^>] +>", "") can this replace malicious code?
------ Solution --------------------
Yes, Javascript or VBScript code is filtered out. this is very important. iframe is filtered out to prevent others from embedding a framework in your web page, causing the visitor to be cheated.
------ Solution --------------------
There should be vulnerabilities. if someone else does not use the script method to call JS, such as a form In this way
------ Solution --------------------
Just test it by yourself. The best way is not to input htlm and use the html function of php.
Htmlentities