【发布时间】:2011-04-16 19:13:29
【问题描述】:
可能重复:
How to prevent IFRAME from redirecting top-level window
<iframe width="980px" frameborder="0" marginheight="0" marginwidth="0" height="1500px" src="http://www.torrentz.com/search?q=<?php echo $_GET['search'] ?>" ></iframe>
我有一个这样的框架。现在当我在我的页面中运行 tun 这个时..它开始将我重定向到“torrentz.com”..
知道如何阻止它吗?
【问题讨论】:
-
您还有一个 HTML 注入 (->XSS) 漏洞。请记住将
htmlspecialchars()任何您echo的字符串写入HTML 页面。 -
请注意,使用框架或 IFrame 在您的网站中显示/嵌入“第三方”网站不仅是不情愿的,而且还可能被解释为侵犯版权(您声称此外部网站是您的一部分)。请仅在您有明确许可的情况下这样做。
标签: html