How do I get jQuery text() to preserve blanks? I want

 $("#ele").text("a     a");

to actually show up with the spaces in between.

I have created a JSFiddle to illustrate the problem.

https://jsfiddle.net/ZX4x9/

.html() works, but then I'd have to convert the other entities first (<, >, ", etc.). And, it seems that text() should be able to do this.

Edit
Report