## Bug description

*Please describe.*  
*If this affects the front-end, screenshots would be of great help.*  

Trailing spaces in the selector box are not removed automatically and can mess up the event results when saving an action

## Expected behavior



## How to reproduce

1. Create a new action with any selector
2. put in a couple of spaces at the end of the line in the selector input box
3. 

## Environment

- Self-managed?
- PostHog version/commit

## Additional context



#### *Thank you* for your bug report – we love squashing them!

posthog/models/event.py
where: List[Union[str, List[str]]] = []
        params: List[Union[str, List[str]]] = []
        for key, value in self.data.items():
            if "attr__" in key:
                where.append("(attributes ->> 'attr__{}') = %s".format(key.split("attr__")[1]))
            else:
                if "__contains" in key:
                    where.append("{} @> %s::varchar(200)[]".format(key.replace("__contains", "")))
                else:
                    where.append("{} = %s".format(key))
            params.append(value)
        return {"where": where, "params": params}
    def clickhouse_query(self, query) -> str:
        where = []
        for key, value in self.data.items():
            if "attr__" in key:
                where.append(query.format("attr__{}".format(key.split("attr__")[1]), value))
            else:
                if "__contains" in key:
                    where.append(" {} IN {}".format(key.replace("__contains", ""), value))
                else:
                    where.append(" {} = '{}'".format(key, value))
        separator = "AND "
        return separator.join(where)
class Selector(object):