Browse Source

Fix #72: Support smart quotes

kegan/smart-quotes
Kegan Dougal 8 years ago
parent
commit
a9899557c5
  1. 6
      src/github.com/matrix-org/go-neb/clients/clients.go

6
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 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{} var responses []interface{}
for _, service := range services { for _, service := range services {

Loading…
Cancel
Save