I suggested a fix for this way back on the preview site but it never got implemented, I don't know if @ianmorland and the team tested it and it didn't work, or if it never made it to the top of the list.
But it was to simply add 1007# ect to the decontaminator (swear filter) and have it automatically replaced by the correctly formatted version.
In theory you'd type *100*7# as normal, the formatting would then be changed to 1007# because of the asterisk and then the decontaminator would then pick that up and convert it back to *100*7#
Alternatively if the decontaminator runs prior to the formatting, simply have it replace *100*7# with \*100\*7\# as the backslashes stops the asterisk changing the formatting, and isn't displayed. So it will still result in *100*7#