mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(files): escape html entities in dav search requests
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.
This commit is contained in:
parent
b99a4373b9
commit
f477d37e6e
1 changed files with 2 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import { getCurrentUser } from '@nextcloud/auth'
|
|||
import { defaultRootPath, getDavNameSpaces, getDavProperties, resultToNode } from '@nextcloud/files/dav'
|
||||
import { getBaseUrl } from '@nextcloud/router'
|
||||
import { client } from './WebdavClient.ts'
|
||||
import escapeHTML from 'escape-html'
|
||||
import logger from '../logger.ts'
|
||||
|
||||
export interface SearchNodesOptions {
|
||||
|
|
@ -56,7 +57,7 @@ export async function searchNodes(query: string, { dir, signal }: SearchNodesOpt
|
|||
</d:select>
|
||||
<d:from>
|
||||
<d:scope>
|
||||
<d:href>/files/${user.uid}${dir || ''}</d:href>
|
||||
<d:href>/files/${user.uid}${dir ? escapeHTML(dir) : ''}</d:href>
|
||||
<d:depth>infinity</d:depth>
|
||||
</d:scope>
|
||||
</d:from>
|
||||
|
|
|
|||
Loading…
Reference in a new issue