mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-18 00:57:55 +00:00
* fix: URL-encode pad names in admin 'Open' button and recent pads (#7865) - encodeURIComponent in admin PadPage 'Open' button href - decodeURIComponent when reading pad name from URL pathname in pad_userlist.ts and colibris/pad.js (recent pads storage) - encodeURIComponent in colibris/index.js recent pads href; display text uses stored name directly (no double-decode) - add recent_pads spec asserting encoded URLs - add share dialog spec asserting URL encoding of special chars * fix: address Qodo review on recent-pads encoding and admin Open button - Normalize legacy URL-encoded recentPads names before re-encoding the href in colibris/index.js, preventing double-encoding (%2F -> %252F) of entries stored by older versions. - Add noopener,noreferrer to the admin 'Open' window.open call to prevent reverse tabnabbing, matching the pattern used elsewhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3e6f9d7bb2
commit
189ea4a29b
6 changed files with 57 additions and 5 deletions
|
|
@ -418,7 +418,7 @@ export const PadPage = () => {
|
|||
</button>
|
||||
<button
|
||||
className="pm-btn pm-btn-primary pm-btn--sm"
|
||||
onClick={() => window.open(`../../p/${pad.padName}`, '_blank')}
|
||||
onClick={() => window.open(`../../p/${encodeURIComponent(pad.padName)}`, '_blank', 'noopener,noreferrer')}
|
||||
>
|
||||
<Eye size={13}/> <Trans i18nKey="admin_pads.open"/>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue