Message text. Multiple spaces converted to one

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:

[{"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..)

This is a HTML thing.

Try putting multiple   in place of the spaces

1 Like