added html encoding of commands