From e176e82960e951d8a0173a03c80e072969ff468c Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 11 Feb 2021 22:47:51 +0100 Subject: [PATCH] remove xml encoding from resourcetype --- changelog/unreleased/align-href-url-encoding-with-oc10.md | 3 ++- internal/http/services/owncloud/ocdav/trashbin.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog/unreleased/align-href-url-encoding-with-oc10.md b/changelog/unreleased/align-href-url-encoding-with-oc10.md index e79ef2db01..f30daf0c45 100644 --- a/changelog/unreleased/align-href-url-encoding-with-oc10.md +++ b/changelog/unreleased/align-href-url-encoding-with-oc10.md @@ -3,6 +3,7 @@ Bugfix: Align href URL encoding with oc10 We now use the same percent encoding for URLs in WebDAV href properties as ownCloud 10. https://github.com/cs3org/reva/pull/1425 +https://github.com/cs3org/reva/pull/1472 https://github.com/owncloud/ocis/issues/1120 https://github.com/owncloud/ocis/issues/1296 -https://github.com/owncloud/ocis/issues/1307 \ No newline at end of file +https://github.com/owncloud/ocis/issues/1307 diff --git a/internal/http/services/owncloud/ocdav/trashbin.go b/internal/http/services/owncloud/ocdav/trashbin.go index 23c258c230..fd9b9480ce 100644 --- a/internal/http/services/owncloud/ocdav/trashbin.go +++ b/internal/http/services/owncloud/ocdav/trashbin.go @@ -274,7 +274,7 @@ func (h *TrashbinHandler) itemToPropResponse(ctx context.Context, s *svc, u *use response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:trashbin-original-location", strings.TrimPrefix(item.Path, "/"))) response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:trashbin-delete-datetime", dTime)) if item.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER { - response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("d:resourcetype", "")) + response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newPropRaw("d:resourcetype", "")) // TODO(jfd): decide if we can and want to list oc:size for folders } else { response.Propstat[0].Prop = append(response.Propstat[0].Prop, @@ -325,7 +325,7 @@ func (h *TrashbinHandler) itemToPropResponse(ctx context.Context, s *svc, u *use } case "resourcetype": if item.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER { - propstatOK.Prop = append(propstatOK.Prop, s.newProp("d:resourcetype", "")) + propstatOK.Prop = append(propstatOK.Prop, s.newPropRaw("d:resourcetype", "")) } else { propstatOK.Prop = append(propstatOK.Prop, s.newProp("d:resourcetype", "")) // redirectref is another option