File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ export const PadPage = () => {
418418 </ button >
419419 < button
420420 className = "pm-btn pm-btn-primary pm-btn--sm"
421- onClick = { ( ) => window . open ( `../../p/${ pad . padName } ` , '_blank' ) }
421+ onClick = { ( ) => window . open ( `../../p/${ encodeURIComponent ( pad . padName ) } ` , '_blank' ) }
422422 >
423423 < Eye size = { 13 } /> < Trans i18nKey = "admin_pads.open" />
424424 </ button >
Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ const paduserlist = (() => {
557557 if ( localStorage . getItem ( 'recentPads' ) != null ) {
558558 const recentPadsList = JSON . parse ( localStorage . getItem ( 'recentPads' ) ) ;
559559 const pathSegments = window . location . pathname . split ( '/' ) ;
560- const padName = pathSegments [ pathSegments . length - 1 ] ;
560+ const padName = decodeURIComponent ( pathSegments [ pathSegments . length - 1 ] ) ;
561561 const existingPad = recentPadsList . find ( ( pad ) => pad . name === padName ) ;
562562 if ( existingPad ) {
563563 existingPad . members = online ;
Original file line number Diff line number Diff line change @@ -70,12 +70,13 @@ window.customStart = () => {
7070 li . style . cursor = 'pointer' ;
7171
7272 li . className = 'recent-pad' ;
73- const padPath = `${ window . location . href } p/${ pad . name } ` ;
73+ const decodedName = decodeURIComponent ( pad . name ) ;
74+ const padPath = `${ window . location . href } p/${ encodeURIComponent ( decodedName ) } ` ;
7475 const link = document . createElement ( 'a' ) ;
7576 link . style . textDecoration = 'none' ;
7677
7778 link . href = padPath ;
78- link . innerText = pad . name ;
79+ link . innerText = decodedName ;
7980 li . appendChild ( link ) ;
8081
8182
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ window.customStart = () => {
88 $ ( '.buttonicon' ) . on ( 'mouseup' , function ( ) { $ ( this ) . parent ( ) . removeClass ( 'pressed' ) ; } ) ;
99
1010 const pathSegments = window . location . pathname . split ( '/' ) ;
11- const padName = pathSegments [ pathSegments . length - 1 ] ;
11+ const padName = decodeURIComponent ( pathSegments [ pathSegments . length - 1 ] ) ;
1212 const recentPads = localStorage . getItem ( 'recentPads' ) ;
1313 if ( recentPads == null ) {
1414 localStorage . setItem ( 'recentPads' , JSON . stringify ( [ ] ) ) ;
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ minified*
33installed_plugins.json
44dirty.db
55rusty.db
6+ update-state.json
You can’t perform that action at this time.
0 commit comments