Moment generating function of a stochastic integral Let $(B_t)_{t\geq 0}$ be a Brownian motion and $f(t)$ a square integrable deterministic function. Then:
$$
\mathbb{E}\left[e^{\int_0^tf(s) \, dB_s}\right] = \mathbb{E}\left[e^{\frac{1}{2}\int_0^t f^2(s) \, ds}\right]
$$
Now assume $(X_t)_{t\geq 0}$ is such that $\left(\int_0^tX_sdB_s\right)_{t\geq 0}$ is well defined. Does 
$$
\mathbb{E}\left[e^{\int_0^tX_s \, dB_s}\right] = \mathbb{E}\left[e^{\frac{1}{2}\int_0^tX_s^2 \, ds}\right]
$$
still hold?

If $X$ and $B$ are independent, yes (use the first result to compute the expectation conditional on $X$, then take the expectation). 
Otherwise, no. For a counterexample, consider $X=B$ and use Itô's formula $\mathrm d (B^2)=2B\mathrm dB+\mathrm dt$.
