uri_escape v10.13.0 把 URI 中的特殊字符做百分号编码,空格会变成 %20。保留字 不会被转义。 输入 {{ "http://foo.com/?q=foo, \bar?" | uri_escape }} 输出 http://foo.com/?q=foo,%20%5Cbar?