diff --git a/src/github.com/matrix-org/go-neb/clients/clients.go b/src/github.com/matrix-org/go-neb/clients/clients.go index fec651c..4352766 100644 --- a/src/github.com/matrix-org/go-neb/clients/clients.go +++ b/src/github.com/matrix-org/go-neb/clients/clients.go @@ -192,6 +192,12 @@ func (c *Clients) onMessageEvent(client *matrix.Client, event *matrix.Event) { return } + // replace all smart quotes with their normal counterparts so shellwords can parse it + body = strings.Replace(body, `‘`, `'`, -1) + body = strings.Replace(body, `’`, `'`, -1) + body = strings.Replace(body, `“`, `"`, -1) + body = strings.Replace(body, `”`, `"`, -1) + var responses []interface{} for _, service := range services {