this regexp (in "replace") replaces all consecutive spaces by nonbreaking spaces. You can see at https://github.com/mozilla-b2g/gaia/pull/13878/files#diff-f56708990d0704c98cca2ee346342db6R255 that Firefox converts it correctly to &nbsp; when we get innerHTML.

If we don't do this, the browser coalesces adjacent spaces into one space.

Note that the browser does the same itself when we type adjacent spaces in a contenteditable element, see the `getContent` function for more information.