Add a space class to a character if it's a space, check for that class instead of checking raw HTML