本文介绍了在asp中阻止HTTP代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何防止asp中的HTTP链接....用于名称"字段,描述"字段等...
How to prevent a HTTP link in asp....for the Name field,description field etc...
推荐答案我想您想阻止您的用户输入 I guess you want to prevent your users from entering something like <a href="www.spammer">Great Spam</a>
进入页面的某些文本文件. 您可以尝试以下操作: -过滤掉任何<>通过JavaScript -过滤掉任何<>在后面的代码中或将其更改为& lt;等 -尝试使用正则表达式进行更精细的解析以检测链接
into some text fileds of your pages. There are some things you could try: - filter out any <> by JavaScript - filter out any <> in the code behind or change them to < etc. - try some more elaborate parsing with regular expressions to detect links
更多推荐
在asp.net中阻止HTTP代码
发布评论