Parse messages on send, not receive

Saves server resources, as messages only have to be parsed once
Also strips MW's automatic <p>
Fixes JS mistake, but you wouldn't have noticed it

Change-Id: I6239f1c69b167e06877e3551473e0b275db4f31f