Skip to content

Commit ed5dc6d

Browse files
committed
fix(files_sharing): do not double escape special characters
- fixes #60163 The strings are already escaped by Vue so no need to escape in the translation method, this will cause double escaping. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 0a24ae5 commit ed5dc6d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

apps/files_sharing/src/public-nickname-handler.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ import logger from './services/logger.ts'
1616

1717
const storage = getBuilder('files_sharing').build()
1818

19-
// Setup file-request nickname header for the uploader
2019
/**
20+
* Setup file-request nickname header for the uploader
2121
*
22-
* @param nickname
22+
* @param nickname - The nickname to set in the header
2323
*/
2424
function registerFileRequestHeader(nickname: string) {
2525
const uploader = getUploader()
2626
uploader.setCustomHeader('X-NC-Nickname', encodeURIComponent(nickname))
2727
logger.debug('Nickname header registered for uploader', { headers: uploader.customHeaders })
2828
}
2929

30-
// Callback when a nickname was chosen
3130
/**
31+
* Callback when a nickname was chosen
3232
*
33-
* @param guest
33+
* @param guest - The guest user with the new nickname
3434
*/
3535
function onUserInfoChanged(guest: NextcloudUser) {
3636
logger.debug('User info changed', { guest })
@@ -57,20 +57,20 @@ window.addEventListener('DOMContentLoaded', () => {
5757

5858
const options = {
5959
nickname,
60-
notice: t('files_sharing', 'To upload files to {folder}, you need to provide your name first.', { folder }),
60+
notice: t('files_sharing', 'To upload files to {folder}, you need to provide your name first.', { folder }, { escape: false }),
6161
subtitle: undefined as string | undefined,
62-
title: t('files_sharing', 'Upload files to {folder}', { folder }),
62+
title: t('files_sharing', 'Upload files to {folder}', { folder }, { escape: false }),
6363
}
6464

6565
// If the guest already has a nickname, we just make them double check
6666
if (nickname) {
67-
options.notice = t('files_sharing', 'Please confirm your name to upload files to {folder}', { folder })
67+
options.notice = t('files_sharing', 'Please confirm your name to upload files to {folder}', { folder }, { escape: false })
6868
}
6969

7070
// If the account owner set their name as public,
7171
// we show it in the subtitle
7272
if (owner) {
73-
options.subtitle = t('files_sharing', '{ownerDisplayName} shared a folder with you.', { ownerDisplayName })
73+
options.subtitle = t('files_sharing', '{ownerDisplayName} shared a folder with you.', { ownerDisplayName }, { escape: false })
7474
}
7575

7676
// If this is a file request, then we need a nickname

0 commit comments

Comments
 (0)