File picker button labels show HTML entities for file names with special characters
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
ピッカーボタンの既定のラベルが作成される lib/filepicker-builder.ts の218~241行目付近を読み、関連するラベルのテストを探してください。gettext がプレースホルダーの値をどのようにエスケープするか、またラベルがテキストとしてどのようにレンダリングされるかを確認してください。アポストロフィやアンパサンドを含む名前がそのまま表示されるようにラベルを更新し、これらの文字を対象とするテストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The file picker button labels that contain a file or folder name show HTML entities when the name contains characters like ', &, < or ", e.g. Choose Tom's folder or Copy to A & B.
The labels are built with the gettext wrapper, which HTML-escapes placeholder values by default:
label = t('Choose {file}', { file: target })
// …
label: target ? t('Copy to {target}', { target }) : t('Copy'),
// …
label: target ? t('Move to {target}', { target }) : t('Move'),
The result is then rendered as plain button text (not as HTML), so the escaped entities are shown literally.
Originally reported in nextcloud/server#55191 for the "Set default folder for accepted shares" picker in the personal sharing settings, but it affects every picker using these default buttons (e.g. "Copy to …" / "Move to …" in the Files app).
To Reproduce
Found by code reading and the screenshot in nextcloud/server#55191.
- Create a folder named
Tom's files. - Open a file picker that uses the default buttons (e.g. "Move or copy" in Files) and select that folder.
- The button shows
Copy to Tom's files.
Expected behavior
The labels show the plain name: either pass the placeholders unescaped (the labels are rendered as text, so no HTML escaping is needed there) or skip escaping for these button labels, with a test for a name containing ' and &.
- 主要言語
- TypeScript
- スター
- 19
- フォーク
- 10
- 平均マージ
- 17時間 4分
- マージ済み PR(30日)
- 30
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud-libraries/nextcloud-dialogs のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
nextcloud-libraries/nextcloud-dialogs#2772 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nextcloud-libraries/nextcloud-dialogs#2771 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nextcloud-libraries/nextcloud-dialogs#2756 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Actions on Toastsオープン1. to develop
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nextcloud-libraries/nextcloud-dialogs#2669 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
1. to develop
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
nextcloud-libraries/nextcloud-dialogs#2510 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
nextcloud-libraries/nextcloud-dialogs の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Make the "%" unit spacing the same in the web and in A10対応中かも @kragent66-glitch が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
maiychrus25/OpenTea-DX-OS#226 · コメント 1 件 ·
-
Editor: leave an uploaded or inserted image's alt text empty, so the preview asks for a descriptionオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
sveltejs/svelte.dev#2417 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: A Markdown link with both a :line suffix and a #L fragment opens a path containing ":line"オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信