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 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>
@opennota

This comment has been minimized.

@0x2d3c

This comment has been minimized.

@0x2d3c 0x2d3c closed this Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.