Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml marshal bug #35612

Closed
0x2d3c opened this issue Nov 15, 2019 · 2 comments
Closed

xml marshal bug #35612

0x2d3c opened this issue Nov 15, 2019 · 2 comments

Comments

@0x2d3c
Copy link

0x2d3c commented Nov 15, 2019

go version go1.13.4 linux/amd64

xml marshal bug

       type Data struct {
		Url string
	}

	var data Data
	data.Url = "http://ip:port/xxxxxxxxxx&1573776000&1573862399"

	b, _ := xml.Marshal(data)
        fmt.Println(string(b))
// want: <Data><Url>rtsp://ip:port/xxxxxxxxxx&1573776000&1573862399</Url></Data>
// result: <Data><Url>rtsp://ip:port/xxxxxxxxxx&amp;1573776000&amp;1573862399</Url></Data>
@ghost
Copy link

ghost commented Nov 15, 2019

@0x2d3c
Copy link
Author

0x2d3c commented Nov 15, 2019

@0x2d3c 0x2d3c closed this as completed Nov 15, 2019
@golang golang locked and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants