From 45d168c79d2d3f3d0dd6247e2b527f3007d84793 Mon Sep 17 00:00:00 2001 From: xuri Date: Tue, 15 Nov 2022 22:08:37 +0800 Subject: This closes #1391, escape XML characters to avoid with corrupt file - Update and improve unit test coverage --- adjust.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'adjust.go') diff --git a/adjust.go b/adjust.go index bf89927..de634fc 100644 --- a/adjust.go +++ b/adjust.go @@ -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 -- cgit v1.2.1