# Message text. Multiple spaces converted to one

**URL:** <https://discourse.nodered.org/t/message-text-multiple-spaces-converted-to-one/12018>\
**Category:** General\
**Created:** [9 June 2019 23:50 UTC](https://discourse.nodered.org/t/message-text-multiple-spaces-converted-to-one/12018 "2019-06-09T23:50:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [9 June 2019 23:50 UTC](https://discourse.nodered.org/t/message-text-multiple-spaces-converted-to-one/12018/1 "2019-06-09T23:50:29Z")

</div>

I am probably asking this because I am still not sure of the terms/names used.

For the sake of establishing a base line here is the problem:

```auto
[{"id":"a0b76c1.eb8881","type":"inject","z":"f64521da.ed6a","name":"","topic":"","payload":"this is a test","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":2590,"wires":[["194d78bb.d1fbcf"]]},{"id":"194d78bb.d1fbcf","type":"ui_text","z":"f64521da.ed6a","group":"1d4190d.ac88b6f","order":1,"width":"4","height":"1","name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":470,"y":2590,"wires":[]},{"id":"1d4190d.ac88b6f","type":"ui_group","z":"","name":"LIST","tab":"ca4afe7.a7c268","order":2,"disp":true,"width":"10","collapse":false},{"id":"ca4afe7.a7c268","type":"ui_tab","z":"","name":"List","icon":"dashboard"}]

```

I want the message to come out as it is in the `inject` node:  
`this is a test`  
Multiple concurrent spaces.  
What I get is:  
`this is a test`  
There will be a simple solution I am sure, but it is beyond me.  
(And I prepared to admit I don't know it..)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 June 2019 23:56 UTC](https://discourse.nodered.org/t/message-text-multiple-spaces-converted-to-one/12018/2 "2019-06-09T23:56:34Z")

</div>

This is a HTML thing.

Try putting multiple `&nbsp;` in place of the spaces
