Skip to content

fix(files): escape html entities in dav search requests - #59889

Merged
leftybournes merged 2 commits into
masterfrom
fix/files_search_with_special_characters
Apr 30, 2026
Merged

fix(files): escape html entities in dav search requests#59889
leftybournes merged 2 commits into
masterfrom
fix/files_search_with_special_characters

Conversation

@leftybournes

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Currently when searching inside a folder with special characters in the name, the server returns a 400 response with 'xmlParseEntityRef: no name...' in the body. This fixes the issue by escaping the characters.

Steps to reproduce:

  1. Create a folder with special characters in the name (e.g. Docs &) and then add files and folders inside
  2. Enter the folder
  3. Search for any files inside the folder in the searchbar in files navigation
  4. Get an error response
image

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@leftybournesleftybournes added this to the Nextcloud 34 milestone Apr 23, 2026
@leftybournes
leftybournes requested review from a team and skjnldsv as code ownersApril 23, 2026 15:10
@leftybournes
leftybournes requested review from susnux and szaimen and removed request for a teamApril 23, 2026 15:10

@szaimenszaimen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@leftybournes
leftybournesforce-pushed the fix/files_search_with_special_characters branch from 3056aa9 to 880aff5CompareApril 30, 2026 00:30
@leftybournes

Copy link
Copy Markdown
MemberAuthor

/compile

leftybournesand others added 2 commits April 30, 2026 11:09
Signed-off-by: Kent Delante <kent@delante.me>
This fixes a 'xmlParseEntityRef: no name' error returned when
searching in files navigation while in folders with special characters
in the name.
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@leftybournes
leftybournesforce-pushed the fix/files_search_with_special_characters branch from e43729c to 614af8fCompareApril 30, 2026 03:10
@leftybournes
leftybournes merged commit afe0d44 into masterApr 30, 2026
152 of 157 checks passed
@leftybournes
leftybournes deleted the fix/files_search_with_special_characters branch April 30, 2026 03:54
@nextcloud-botnextcloud-bot mentioned this pull request Apr 30, 2026
@leftybournes

Copy link
Copy Markdown
MemberAuthor

/backport to stable33

@leftybournes

Copy link
Copy Markdown
MemberAuthor

/backport to stable32

@nextcloud-botnextcloud-bot mentioned this pull request May 20, 2026
@nextcloud-botnextcloud-bot mentioned this pull request May 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@leftybournes@susnux@szaimen@nextcloud-command