Rotonde / rotonde-client

Rotonde Base Client
https://client-neauoire.hashbase.io/
MIT License
227 stars 49 forks source link

Fix quoting from portals with - in name #158

Closed 0x0ade closed 6 years ago

0x0ade commented 6 years ago

Cherry-picked this from #157 as it's a little more critical than the other fixes.

Quoting f.e. 0x0ade/test-a-3 (3rd message from 0x0ade/test-a) was impossible before. The options string was split, [0] was used as the portal name (0x0ade/test) and [1] was used as the ref id (a). This PR replaces that with

var {name, ref} = r.operator.split_nameref(option);

where split_nameref uses everything past the last - as the ref id.