fix removeAttr to remove space separated list

In reference to #1041