In the proof of lemma 7.3.2 in Oksendale's book there is a part I cannot understand. Here is the part that I am having trouble.
Here, $B_t$ is standard Brownian motion. It says since $g(Y_t)$ and the characteristic function is measurable, the expectation is zero. I cannot find any related explanation throughout of this book. I have no idea why it is true and hope to know why.
I thank you in advance for any helps!

These claims follows from the fact that if an adapted and measurable process $h(s)$ satisfy
$$ \mathbb{E}\left[\int_0^t h^2(s)ds\right]<\infty \quad (*)$$
then
$$ \mathbb{E}\left[\int_0^t h(s)dB(s)\right] =0 $$ and
$$ \mathbb{E}\left[\left(\int_0^t h(s)dB(s)\right)^2\right] = \mathbb{E}\left[\int_0^t h^2(s)ds)\right] $$
If you define $h(s)\equiv \mathcal{X}_{\{s<\tau\}}g(s)$ then it is clear that the condition $(*)$ is satsified and so the claims follows.