Chinaunix首页 | 论坛 | 博客
  • 博客访问: 39170
  • 博文数量: 20
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 199
  • 用 户 组: 普通用户
  • 注册时间: 2015-03-04 08:17
文章分类

全部博文(20)

文章存档

2015年(20)

我的朋友

分类: Web开发

2015-03-23 13:51:06


Strict Contextual Escaping
$sanitize
- service in module ngSanitize
The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are then serialized back to properly escaped html string. This means that no unsafe input can make it into the returned string, however, since our parser is more strict than a typical browser parser, it's possible that some obscure input, which would be recognized as valid HTML by a browser, won't make it through the sanitizer. The input may also contain SVG markup. The whitelist is configured using the functions aHrefSanitizationWhitelistand imgSrcSanitizationWhitelist of $compileProvider.

阅读(1438) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~