diff options
author | xuri <xuri.me@gmail.com> | 2022-11-15 22:08:37 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-11-15 22:08:37 +0800 |
commit | 45d168c79d2d3f3d0dd6247e2b527f3007d84793 (patch) | |
tree | 70d84647e84a8e04939e797b9ca7ceee008bf4a6 /adjust.go | |
parent | ac564afa56a691e378ab9bb04cb14bb283886a16 (diff) |
This closes #1391, escape XML characters to avoid with corrupt file
- Update and improve unit test coverage
Diffstat (limited to 'adjust.go')
-rw-r--r-- | adjust.go | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -279,16 +279,14 @@ func (f *File) adjustAutoFilter(ws *xlsxWorksheet, dir adjustDirection, num, off rowData.Hidden = false } } - return nil + return err } coordinates = f.adjustAutoFilterHelper(dir, coordinates, num, offset) x1, y1, x2, y2 = coordinates[0], coordinates[1], coordinates[2], coordinates[3] - if ws.AutoFilter.Ref, err = f.coordinatesToRangeRef([]int{x1, y1, x2, y2}); err != nil { - return err - } - return nil + ws.AutoFilter.Ref, err = f.coordinatesToRangeRef([]int{x1, y1, x2, y2}) + return err } // adjustAutoFilterHelper provides a function for adjusting auto filter to |