Fix #401, space before attribute selector trimmed