编码/解码URL

huangapple go评论80阅读模式
英文:

Encode / decode URLs

问题

什么是在Go中编码和解码整个URL的推荐方法?我知道有url.QueryEscapeurl.QueryUnescape这些方法,但它们似乎不完全符合我的需求。具体来说,我正在寻找类似JavaScript的encodeURIComponentdecodeURIComponent的方法。

英文:

What's the recommended way of encoding and decoding entire URLs in Go? I am aware of the methods url.QueryEscape and url.QueryUnescape, but they don't seem to be exactly what I am looking for. Specifically I am looking for methods like JavaScript's encodeURIComponent and decodeURIComponent.

答案1

得分: 98

你可以使用net/url模块进行所有的URL编码。它不会为URL的各个部分提供单独的编码函数,你需要让它构建整个URL。通过查看源代码,我认为它做得非常好,符合标准。

这是一个示例(playground链接

package main

import (
    "fmt"
    "net/url"
)

func main() {

    Url, err := url.Parse("http://www.example.com")
    if err != nil {
        panic("boom")
    }

    Url.Path += "/some/path/or/other_with_funny_characters?_or_not/"
    parameters := url.Values{}
    parameters.Add("hello", "42")
    parameters.Add("hello", "54")
    parameters.Add("vegetable", "potato")
    Url.RawQuery = parameters.Encode()

    fmt.Printf("Encoded URL is %q\n", Url.String())
}

它会打印出:

Encoded URL is "http://www.example.com/some/path/or/other_with_funny_characters%3F_or_not/?vegetable=potato&hello=42&hello=54"
英文:

You can do all the URL encoding you want with the net/url module. It doesn't break out the individual encoding functions for the parts of the URL, you have to let it construct the whole URL. Having had a squint at the source code I think it does a very good and standards compliant job.

Here is an example (playground link)

package main

import (
	"fmt"
	"net/url"
)

func main() {

	Url, err := url.Parse("http://www.example.com")
	if err != nil {
		panic("boom")
	}

	Url.Path += "/some/path/or/other_with_funny_characters?_or_not/"
	parameters := url.Values{}
	parameters.Add("hello", "42")
	parameters.Add("hello", "54")
	parameters.Add("vegetable", "potato")
	Url.RawQuery = parameters.Encode()

	fmt.Printf("Encoded URL is %q\n", Url.String())
}

Which prints-

Encoded URL is "http://www.example.com/some/path/or/other_with_funny_characters%3F_or_not/?vegetable=potato&hello=42&hello=54"

答案2

得分: 15

MDN关于encodeURIComponent的文档中:

encodeURIComponent转义除以下字符外的所有字符:字母、十进制数字、'-', '_', '.', '!', '~', '*', ''', '(', ')'

Go的url.QueryEscape实现(具体来说,是shouldEscape私有函数),转义除以下字符外的所有字符:字母、十进制数字、'-', '_', '.', '~'

与Javascript不同,Go的QueryEscape() 转义 '!', '*', ''', '(', ')'。基本上,Go的版本严格遵守RFC-3986规范。而Javascript的版本则更宽松。再次引用MDN的说明:

如果希望更严格地遵守RFC 3986(该规范保留了!、'、(、)和*这些字符,尽管这些字符没有正式的URI分隔用途),可以安全地使用以下代码:

function fixedEncodeURIComponent (str) {
  return encodeURIComponent(str).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
}
英文:

From MDN on encodeURIComponent:

> encodeURIComponent escapes all characters except the following: alphabetic, decimal digits, '-', '_', '.', '!', '~', '*', ''', '(', ')'

From Go's implementation of url.QueryEscape (specifically, the shouldEscape private function), escapes all characters except the following: alphabetic, decimal digits, '-', '_', '.', '~'.

Unlike Javascript, Go's QueryEscape() will escape '!', '*', ''', '(', ')'. Basically, Go's version is strictly RFC-3986 compliant. Javascript's is looser. Again from MDN:

> If one wishes to be more stringent in adhering to RFC 3986 (which reserves !, ', (, ), and *), even though these characters have no formalized URI delimiting uses, the following can be safely used:

function fixedEncodeURIComponent (str) {
  return encodeURIComponent(str).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
}

答案3

得分: 10

从Go 1.8开始,情况发生了变化。除了旧的QueryEscape用于编码路径组件之外,我们现在还可以使用PathEscape,以及相应的解码函数PathUnescape

英文:

As of Go 1.8, this situation has changed. We now have access to PathEscape in addition to the older QueryEscape to encode path components, along with the unescape counterpart PathUnescape.

答案4

得分: 6

template.URLQueryEscaper(path)

英文:

How about this:

template.URLQueryEscaper(path)

答案5

得分: 5

为了模仿Javascript的encodeURIComponent()函数,我创建了一个字符串辅助函数。

示例:将"My String"转换为"My%20String"

https://github.com/mrap/stringutil/blob/master/urlencode.go

import "net/url"

// UrlEncoded函数像Javascript的encodeURIComponent()函数一样对字符串进行编码
func UrlEncoded(str string) (string, error) {
    u, err := url.Parse(str)
    if err != nil {
        return "", err
    }
    return u.String(), nil
}
英文:

For mimicking Javascript's encodeURIComponent(), I created a string helper function.

Example: Turns "My String" to "My%20String"

https://github.com/mrap/stringutil/blob/master/urlencode.go

import "net/url"

// UrlEncoded encodes a string like Javascript's encodeURIComponent()
func UrlEncoded(str string) (string, error) {
	u, err := url.Parse(str)
	if err != nil {
		return "", err
	}
	return u.String(), nil
}

答案6

得分: 4

如果有人想要得到与JS的encodeURIComponent函数相同的结果,请尝试我的函数,它虽然有点乱,但效果很好。

https://gist.github.com/czyang/7ae30f4f625fee14cfc40c143e1b78bf

// #警告!请小心使用此代码,并自担风险。
package main

import (
"fmt"
"net/url"
"strings"
)

/*
经过几个小时的搜索,我找不到任何方法可以得到与JS的encodeURIComponent函数完全相同的结果。
在我的情况下,我需要编写一个签名方法,该方法需要对用户输入进行编码,与JS的encodeURIComponent完全相同。
这个函数解决了我的问题。
/
func main() {
params := url.Values{
"test_string": {"+!+'( )
-._~0-👿 👿9a-zA-Z 中文测试 test with ❤️ !@#$%^&&*()~<>?/.,;'[][]:{{}|{}|"},
}
urlEncode := params.Encode()
fmt.Println(urlEncode)
urlEncode = compatibleRFC3986Encode(urlEncode)
fmt.Println("RFC3986", urlEncode)
urlEncode = compatibleJSEncodeURIComponent(urlEncode)
fmt.Println("JS encodeURIComponent", urlEncode)
}

// 兼容RFC 3986。
func compatibleRFC3986Encode(str string) string {
resultStr := str
resultStr = strings.Replace(resultStr, "+", "%20", -1)
return resultStr
}

// 这个函数模仿JS的encodeURIComponent,JS很随意,不太严格。
func compatibleJSEncodeURIComponent(str string) string {
resultStr := str
resultStr = strings.Replace(resultStr, "+", "%20", -1)
resultStr = strings.Replace(resultStr, "%21", "!", -1)
resultStr = strings.Replace(resultStr, "%27", "'", -1)
resultStr = strings.Replace(resultStr, "%28", "(", -1)
resultStr = strings.Replace(resultStr, "%29", ")", -1)
resultStr = strings.Replace(resultStr, "%2A", "*", -1)
return resultStr
}

英文:

If someone wants to get the exact result compare to the JS encodeURIComponent Try my function it's dirty but works well.

https://gist.github.com/czyang/7ae30f4f625fee14cfc40c143e1b78bf

// #Warning! You Should Use this Code Carefully, and As Your Own Risk.
    package main
    
    import (
	&quot;fmt&quot;
	&quot;net/url&quot;
	&quot;strings&quot;
)
/*
After hours searching, I can&#39;t find any method can get the result exact as the JS encodeURIComponent function.
In my situation I need to write a sign method which need encode the user input exact same as the JS encodeURIComponent.
This function does solved my problem.
*/
func main() {
	params := url.Values{
		&quot;test_string&quot;: {&quot;+!+&#39;( )*-._~0-&#128127;  &#128127;9a-zA-Z 中文测试 test with ❤️ !@#$%^&amp;&amp;*()~&lt;&gt;?/.,;&#39;[][]:{{}|{}|&quot;},
	}
	urlEncode := params.Encode()
	fmt.Println(urlEncode)
	urlEncode = compatibleRFC3986Encode(urlEncode)
	fmt.Println(&quot;RFC3986&quot;, urlEncode)
	urlEncode = compatibleJSEncodeURIComponent(urlEncode)
	fmt.Println(&quot;JS encodeURIComponent&quot;, urlEncode)
}

// Compatible with RFC 3986.
func compatibleRFC3986Encode(str string) string {
	resultStr := str
	resultStr = strings.Replace(resultStr, &quot;+&quot;, &quot;%20&quot;, -1)
	return resultStr
}

// This func mimic JS encodeURIComponent, JS is wild and not very strict.
func compatibleJSEncodeURIComponent(str string) string {
	resultStr := str
	resultStr = strings.Replace(resultStr, &quot;+&quot;, &quot;%20&quot;, -1)
	resultStr = strings.Replace(resultStr, &quot;%21&quot;, &quot;!&quot;, -1)
	resultStr = strings.Replace(resultStr, &quot;%27&quot;, &quot;&#39;&quot;, -1)
	resultStr = strings.Replace(resultStr, &quot;%28&quot;, &quot;(&quot;, -1)
	resultStr = strings.Replace(resultStr, &quot;%29&quot;, &quot;)&quot;, -1)
	resultStr = strings.Replace(resultStr, &quot;%2A&quot;, &quot;*&quot;, -1)
	return resultStr
}

答案7

得分: -1

希望这能帮到你

// url 编码
func UrlEncodedISO(str string) (string, error) {
    u, err := url.Parse(str)
    if err != nil {
        return "", err
    }
    q := u.Query()
    return q.Encode(), nil
}
· * 编码为 %2A
· # 编码为 %23
· % 编码为 %25
· < 编码为 %3C
· > 编码为 %3E
· + 编码为 %2B
· 回车键 (#13#10) 编码为 %0D%0A
英文:

Hope this helps

 // url encoded
func UrlEncodedISO(str string) (string, error) {
	u, err := url.Parse(str)
	if err != nil {
		return &quot;&quot;, err
	}
	q := u.Query()
	return q.Encode(), nil
}
 * encoded into %2A
 # encoded into %23
 % encoded into %25
 &lt; encoded into %3C
 &gt; encoded into %3E
 + encoded into %2B
 enter key (#13#10) is encoded into %0D%0A

答案8

得分: -2

这是一个转义和反转义的实现(从go源代码中提取):

package main


import (
    "fmt"
    "strconv"
)


const (
    encodePath encoding = 1 + iota
    encodeHost
    encodeUserPassword
    encodeQueryComponent
    encodeFragment
)

type encoding int
type EscapeError string

func (e EscapeError) Error() string {
    return "invalid URL escape " + strconv.Quote(string(e))
}


func ishex(c byte) bool {
    switch {
    case '0' <= c && c <= '9':
        return true
    case 'a' <= c && c <= 'f':
        return true
    case 'A' <= c && c <= 'F':
        return true
    }
    return false
}

func unhex(c byte) byte {
    switch {
    case '0' <= c && c <= '9':
        return c - '0'
    case 'a' <= c && c <= 'f':
        return c - 'a' + 10
    case 'A' <= c && c <= 'F':
        return c - 'A' + 10
    }
    return 0
}



// 根据RFC 3986,如果指定的字符在URL字符串中出现时应该进行转义,则返回true。
//
// 请注意,目前shouldEscape不正确地检查所有保留字符。请参阅golang.org/issue/5684。
func shouldEscape(c byte, mode encoding) bool {
    // §2.3 未保留字符(字母数字)
    if 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' {
        return false
    }

    if mode == encodeHost {
        // §3.2.2 主机允许
        //	sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
        // 作为reg-name的一部分。
        // 我们添加:,因为我们将:port作为主机的一部分。
        // 我们添加[ ],因为我们将[ipv6]:port作为主机的一部分
        switch c {
        case '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=', ':', '[', ']':
            return false
        }
    }

    switch c {
    case '-', '_', '.', '~': // §2.3 未保留字符(标记)
        return false

    case '$', '&', '+', ',', '/', ':', ';', '=', '?', '@': // §2.2 保留字符(保留)
        // URL的不同部分允许一些保留字符出现未转义。
        switch mode {
        case encodePath: // §3.3
            // RFC允许:@&=+$,但保留/;,用于为单个路径段分配含义。
            // 此包仅将路径作为整体处理,因此我们也允许这两个。
            // 这样只剩下?需要转义。
            return c == '?'

        case encodeUserPassword: // §3.2.1
            // RFC允许;:&#39;&amp;&#39;=&#39;+&#39;$&#39;和&#39;,&#39;在userinfo中,因此我们只需转义&#39;@&#39;,&#39;/&#39;和&#39;?&#39;。
            // userinfo的解析将&#39;:&#39;视为特殊字符,因此我们必须转义它。
            return c == '@' || c == '/' || c == '?' || c == ':'

        case encodeQueryComponent: // §3.4
            // RFC保留(因此我们必须转义)一切。
            return true

        case encodeFragment: // §4.1
            // RFC文本是沉默的,但语法允许一切,因此不转义任何内容。
            return false
        }
    }

    // 其他所有字符都必须转义。
    return true
}



func escape(s string, mode encoding) string {
    spaceCount, hexCount := 0, 0
    for i := 0; i < len(s); i++ {
        c := s[i]
        if shouldEscape(c, mode) {
            if c == ' ' && mode == encodeQueryComponent {
                spaceCount++
            } else {
                hexCount++
            }
        }
    }

    if spaceCount == 0 && hexCount == 0 {
        return s
    }

    t := make([]byte, len(s)+2*hexCount)
    j := 0
    for i := 0; i < len(s); i++ {
        switch c := s[i]; {
        case c == ' ' && mode == encodeQueryComponent:
            t[j] = '+'
            j++
        case shouldEscape(c, mode):
            t[j] = '%'
            t[j+1] = "0123456789ABCDEF"[c>>4]
            t[j+2] = "0123456789ABCDEF"[c&15]
            j += 3
        default:
            t[j] = s[i]
            j++
        }
    }
    return string(t)
}


// unescape反转义字符串;mode指定正在反转义的URL字符串的哪个部分。
func unescape(s string, mode encoding) (string, error) {
    // 计算%,检查它们是否格式正确。
    n := 0
    hasPlus := false
    for i := 0; i < len(s); {
        switch s[i] {
        case '%':
            n++
            if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
                s = s[i:]
                if len(s) > 3 {
                    s = s[:3]
                }
                return "", EscapeError(s)
            }
            i += 3
        case '+':
            hasPlus = mode == encodeQueryComponent
            i++
        default:
            i++
        }
    }

    if n == 0 && !hasPlus {
        return s, nil
    }

    t := make([]byte, len(s)-2*n)
    j := 0
    for i := 0; i < len(s); {
        switch s[i] {
        case '%':
            t[j] = unhex(s[i+1])<<4 | unhex(s[i+2])
            j++
            i += 3
        case '+':
            if mode == encodeQueryComponent {
                t[j] = ' '
            } else {
                t[j] = '+'
            }
            j++
            i++
        default:
            t[j] = s[i]
            j++
            i++
        }
    }
    return string(t), nil
}


func EncodeUriComponent(rawString string) string{
    return escape(rawString, encodeFragment)
}

func DecodeUriCompontent(encoded string) (string, error){
    return unescape(encoded, encodeQueryComponent)
}


func main() {
    // http://www.url-encode-decode.com/
    origin := "äöüHel/lo world"
    encoded := EncodeUriComponent(origin)
    fmt.Println(encoded)
    
    s, _ := DecodeUriCompontent(encoded)
    fmt.Println(s)
}
英文:

Here's an implementation of escape and unescape (ripped from go source):

package main
import (  
&quot;fmt&quot;
&quot;strconv&quot;
)
const (
encodePath encoding = 1 + iota
encodeHost
encodeUserPassword
encodeQueryComponent
encodeFragment
)
type encoding int
type EscapeError string
func (e EscapeError) Error() string {
return &quot;invalid URL escape &quot; + strconv.Quote(string(e))
}
func ishex(c byte) bool {
switch {
case &#39;0&#39; &lt;= c &amp;&amp; c &lt;= &#39;9&#39;:
return true
case &#39;a&#39; &lt;= c &amp;&amp; c &lt;= &#39;f&#39;:
return true
case &#39;A&#39; &lt;= c &amp;&amp; c &lt;= &#39;F&#39;:
return true
}
return false
}
func unhex(c byte) byte {
switch {
case &#39;0&#39; &lt;= c &amp;&amp; c &lt;= &#39;9&#39;:
return c - &#39;0&#39;
case &#39;a&#39; &lt;= c &amp;&amp; c &lt;= &#39;f&#39;:
return c - &#39;a&#39; + 10
case &#39;A&#39; &lt;= c &amp;&amp; c &lt;= &#39;F&#39;:
return c - &#39;A&#39; + 10
}
return 0
}
// Return true if the specified character should be escaped when
// appearing in a URL string, according to RFC 3986.
//
// Please be informed that for now shouldEscape does not check all
// reserved characters correctly. See golang.org/issue/5684.
func shouldEscape(c byte, mode encoding) bool {
// &#167;2.3 Unreserved characters (alphanum)
if &#39;A&#39; &lt;= c &amp;&amp; c &lt;= &#39;Z&#39; || &#39;a&#39; &lt;= c &amp;&amp; c &lt;= &#39;z&#39; || &#39;0&#39; &lt;= c &amp;&amp; c &lt;= &#39;9&#39; {
return false
}
if mode == encodeHost {
// &#167;3.2.2 Host allows
//	sub-delims = &quot;!&quot; / &quot;$&quot; / &quot;&amp;&quot; / &quot;&#39;&quot; / &quot;(&quot; / &quot;)&quot; / &quot;*&quot; / &quot;+&quot; / &quot;,&quot; / &quot;;&quot; / &quot;=&quot;
// as part of reg-name.
// We add : because we include :port as part of host.
// We add [ ] because we include [ipv6]:port as part of host
switch c {
case &#39;!&#39;, &#39;$&#39;, &#39;&amp;&#39;, &#39;\&#39;&#39;, &#39;(&#39;, &#39;)&#39;, &#39;*&#39;, &#39;+&#39;, &#39;,&#39;, &#39;;&#39;, &#39;=&#39;, &#39;:&#39;, &#39;[&#39;, &#39;]&#39;:
return false
}
}
switch c {
case &#39;-&#39;, &#39;_&#39;, &#39;.&#39;, &#39;~&#39;: // &#167;2.3 Unreserved characters (mark)
return false
case &#39;$&#39;, &#39;&amp;&#39;, &#39;+&#39;, &#39;,&#39;, &#39;/&#39;, &#39;:&#39;, &#39;;&#39;, &#39;=&#39;, &#39;?&#39;, &#39;@&#39;: // &#167;2.2 Reserved characters (reserved)
// Different sections of the URL allow a few of
// the reserved characters to appear unescaped.
switch mode {
case encodePath: // &#167;3.3
// The RFC allows : @ &amp; = + $ but saves / ; , for assigning
// meaning to individual path segments. This package
// only manipulates the path as a whole, so we allow those
// last two as well. That leaves only ? to escape.
return c == &#39;?&#39;
case encodeUserPassword: // &#167;3.2.1
// The RFC allows &#39;;&#39;, &#39;:&#39;, &#39;&amp;&#39;, &#39;=&#39;, &#39;+&#39;, &#39;$&#39;, and &#39;,&#39; in
// userinfo, so we must escape only &#39;@&#39;, &#39;/&#39;, and &#39;?&#39;.
// The parsing of userinfo treats &#39;:&#39; as special so we must escape
// that too.
return c == &#39;@&#39; || c == &#39;/&#39; || c == &#39;?&#39; || c == &#39;:&#39;
case encodeQueryComponent: // &#167;3.4
// The RFC reserves (so we must escape) everything.
return true
case encodeFragment: // &#167;4.1
// The RFC text is silent but the grammar allows
// everything, so escape nothing.
return false
}
}
// Everything else must be escaped.
return true
}
func escape(s string, mode encoding) string {
spaceCount, hexCount := 0, 0
for i := 0; i &lt; len(s); i++ {
c := s[i]
if shouldEscape(c, mode) {
if c == &#39; &#39; &amp;&amp; mode == encodeQueryComponent {
spaceCount++
} else {
hexCount++
}
}
}
if spaceCount == 0 &amp;&amp; hexCount == 0 {
return s
}
t := make([]byte, len(s)+2*hexCount)
j := 0
for i := 0; i &lt; len(s); i++ {
switch c := s[i]; {
case c == &#39; &#39; &amp;&amp; mode == encodeQueryComponent:
t[j] = &#39;+&#39;
j++
case shouldEscape(c, mode):
t[j] = &#39;%&#39;
t[j+1] = &quot;0123456789ABCDEF&quot;[c&gt;&gt;4]
t[j+2] = &quot;0123456789ABCDEF&quot;[c&amp;15]
j += 3
default:
t[j] = s[i]
j++
}
}
return string(t)
}
// unescape unescapes a string; the mode specifies
// which section of the URL string is being unescaped.
func unescape(s string, mode encoding) (string, error) {
// Count %, check that they&#39;re well-formed.
n := 0
hasPlus := false
for i := 0; i &lt; len(s); {
switch s[i] {
case &#39;%&#39;:
n++
if i+2 &gt;= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
s = s[i:]
if len(s) &gt; 3 {
s = s[:3]
}
return &quot;&quot;, EscapeError(s)
}
i += 3
case &#39;+&#39;:
hasPlus = mode == encodeQueryComponent
i++
default:
i++
}
}
if n == 0 &amp;&amp; !hasPlus {
return s, nil
}
t := make([]byte, len(s)-2*n)
j := 0
for i := 0; i &lt; len(s); {
switch s[i] {
case &#39;%&#39;:
t[j] = unhex(s[i+1])&lt;&lt;4 | unhex(s[i+2])
j++
i += 3
case &#39;+&#39;:
if mode == encodeQueryComponent {
t[j] = &#39; &#39;
} else {
t[j] = &#39;+&#39;
}
j++
i++
default:
t[j] = s[i]
j++
i++
}
}
return string(t), nil
}
func EncodeUriComponent(rawString string) string{
return escape(rawString, encodeFragment)
}
func DecodeUriCompontent(encoded string) (string, error){
return unescape(encoded, encodeQueryComponent)
}
// https://golang.org/src/net/url/url.go
// http://remove-line-numbers.ruurtjan.com/
func main() {
// http://www.url-encode-decode.com/
origin := &quot;&#228;&#246;&#252;Hel/lo world&quot;
encoded := EncodeUriComponent(origin)
fmt.Println(encoded)
s, _ := DecodeUriCompontent(encoded)
fmt.Println(s)
}

<br />

// -------------------------------------------------------
/*
func UrlEncoded(str string) (string, error) {
u, err := url.Parse(str)
if err != nil {
return &quot;&quot;, err
}
return u.String(), nil
}
// http://stackoverflow.com/questions/13820280/encode-decode-urls
// import &quot;net/url&quot;
func old_main() {
a,err := UrlEncoded(&quot;hello world&quot;)
if err != nil {
fmt.Println(err)
}
fmt.Println(a)
// https://gobyexample.com/url-parsing
//s := &quot;postgres://user:pass@host.com:5432/path?k=v#f&quot;
s := &quot;postgres://user:pass@host.com:5432/path?k=vbla%23fooa#f&quot;
u, err := url.Parse(s)
if err != nil {
panic(err)
}
fmt.Println(u.RawQuery)
fmt.Println(u.Fragment)
fmt.Println(u.String())
m, _ := url.ParseQuery(u.RawQuery)
fmt.Println(m)
fmt.Println(m[&quot;k&quot;][0])
}
*/
// -------------------------------------------------------

huangapple
  • 本文由 发表于 2012年12月11日 20:17:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/13820280.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定