After the viewing the answers on
http://stackoverflow.com/q/8733873/908879 , We noticed that the addClass() trim is performed
after adding the class.
This creates double spaces in cases like "myclass<space>"
The solution is simple, make the trim before.