diff --git a/src/pkg/xml/read_test.go b/src/pkg/xml/read_test.go index 68bb010f2f2..97fa423d6ac 100644 --- a/src/pkg/xml/read_test.go +++ b/src/pkg/xml/read_test.go @@ -24,7 +24,7 @@ func TestUnmarshalFeed(t *testing.T) { // hget http://codereview.appspot.com/rss/mine/rsc const rssFeedString = ` -Code Review - My issueshttp://codereview.appspot.com/2009-10-04T01:35:58+00:00rietveldrietveld: an attempt at pubsubhubbub +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><title>Code Review - My issueshttp://codereview.appspot.com/2009-10-04T01:35:58+00:00rietveld<>rietveld: an attempt at pubsubhubbub 2009-10-04T01:35:58+00:00email-address-removedurn:md5:134d9179c41f806be79b3a5f7877d19a An attempt at adding pubsubhubbub support to Rietveld. http://code.google.com/p/pubsubhubbub @@ -125,8 +125,8 @@ var rssFeed = Feed{ Id: "http://codereview.appspot.com/", Updated: "2009-10-04T01:35:58+00:00", Author: Person{ - Name: "rietveld", - InnerXML: "rietveld", + Name: "rietveld<>", + InnerXML: "rietveld<>", }, Entry: []Entry{ Entry{ diff --git a/src/pkg/xml/xml.go b/src/pkg/xml/xml.go index 410b0f77cac..1ad1039f644 100644 --- a/src/pkg/xml/xml.go +++ b/src/pkg/xml/xml.go @@ -795,8 +795,9 @@ Input: var i int CharLoop: for i = 0; i < len(p.tmp); i++ { - p.tmp[i], p.err = p.r.ReadByte() - if p.err != nil { + var ok bool + p.tmp[i], ok = p.getc() + if !ok { if p.err == os.EOF { p.err = p.syntaxError("unexpected EOF") }