File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,9 @@ function Postgres(a, b) {
176
176
return { state : result . state , unlisten }
177
177
}
178
178
179
- channels [ name ] = { result : sql `listen ${ sql ( name ) } ` , listeners : [ listener ] }
179
+ channels [ name ] = { result : sql `listen ${
180
+ sql . unsafe ( '"' + name . replace ( / " / g, '""' ) + '"' )
181
+ } `, listeners : [ listener ] }
180
182
const result = await channels [ name ] . result
181
183
listener . onlisten && listener . onlisten ( )
182
184
return { state : result . state , unlisten }
Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ t('multiple listeners work after a reconnect', async() => {
701
701
702
702
t ( 'listen and notify with weird name' , async ( ) => {
703
703
const sql = postgres ( options )
704
- const channel = 'wat-;ø §'
704
+ const channel = 'wat-;.ø. §'
705
705
const result = await new Promise ( async r => {
706
706
await sql . listen ( channel , r )
707
707
sql . notify ( channel , 'works' )
You can’t perform that action at this time.
0 commit comments