/events: Use return value of trim instead