惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
I
InfoQ
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
有赞技术团队
有赞技术团队
G
Google Developers Blog
L
LangChain Blog
博客园_首页
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
IT之家
IT之家
量子位
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网

博客园 - 小灰灰开始整活儿啦

喔去,litellm 竟然被投毒了,赶紧检查你的机器中招了没有 KMP跨平台开发中的现状调研 [随记]iphone加粗字体 .net 序列化反序列化小节 如何获得毫秒级时间(iphone) Mac os 截屏快捷键 消灭Warning 'ClassName' may not respond to '-funcName:args' 给xcode设置快捷键 - 小灰灰开始整活儿啦 - 博客园 [转]iPhone系统常用文件夹位置 Xcode 快捷键全集[转] iphone中如何进行多线程编程[转] NSString详细介绍 Iphone UILabel显示多行文本的方法 iPhone上的JSON[转] Iphone dev -json-1- Transfer json data by Http Submitting HTTP Requests (iPhone) 不支持js的(wap2.0)手机清单 HTC 手机的'Length Require的Bug [编程点滴]将string 转化成enum最简单的办法。
Safe characters for friendly url
小灰灰开始整活儿啦 · 2010-08-09 · via 博客园 - 小灰灰开始整活儿啦

The format for an URI is defined in RFC 3986. See section 3.3 for details.

 -------------------

You are best keeping only some characters (whitelist) instead of removing certain characters (blacklist).

You can technically allow any character, just as long as you properly encode it. But, to answer in the spirit of the question, you should only allow these characters:

  1. Lower case letters (convert upper case to lower)
  2. Numbers, 0 through 9
  3. A dash - or underscore _(在将一些字串转成base64时,我一般将/转成_,+转成-)
  4. Tilda ~ 

Everything else has a potentially special meaning. For example, you may think you can use +, but it can be replaced with a space. & is dangerous, too, especially if using some rewrite rules.

As with the other comments, check out the standards and specifications for complete details.