Przeglądaj źródła

[GinR] odML double decoding

odML filss where decoded twice, doubling the number of sections displayed
#fixes #18
cgars 7 lat temu
rodzic
commit
a077a05026
1 zmienionych plików z 0 dodań i 1 usunięć
  1. 0 1
      routes/repo/view.go

+ 0 - 1
routes/repo/view.go

@@ -291,7 +291,6 @@ func renderFile(c *context.Context, entry *git.TreeEntry, treeLink, rawLink stri
 			if tool.IsOdmlFile(buf) {
 			if tool.IsOdmlFile(buf) {
 				c.Data["IsOdML"] = true
 				c.Data["IsOdML"] = true
 				od := odml.Odml{}
 				od := odml.Odml{}
-				xml.Unmarshal(buf, &od)
 				decoder := xml.NewDecoder(bytes.NewReader(buf))
 				decoder := xml.NewDecoder(bytes.NewReader(buf))
 				decoder.CharsetReader = charset.NewReaderLabel
 				decoder.CharsetReader = charset.NewReaderLabel
 				decoder.Decode(&od)
 				decoder.Decode(&od)