Solution (source code)

= Solution
{c}

The <semimartingale integration by parts> gives
$$
d(X_tM_t)=X_t\,dM_t+M_t\,dX_t+d\langle X,M\rangle_t,
\qquad M_t=M(h)_t.
$$
Here $d\langle X,M\rangle_t=h(t)M_tdt$. Substitution therefore gives cancellation of the drift:
$$
dY_t=X_th(t)M_t\,dB_t+M_t(-h(t)dt+dB_t)+h(t)M_tdt
=\boxed{M_t(1+h(t)X_t)\,dB_t.}
$$
The continuous <adapted> <integrand> is locally square integrable. Stopping when $|X|+M$ first exceeds an integer produces true stochastic-integral <martingales>, hence $Y$ is a \b[<local martingale>]. No unproved global integrability of the product is needed.