Let $S_t$ be a geometric brownian motion such as $$d S(t) = rS(t)dt +\sigma S(t)dW(t),$$ where $W$ is a standard Brownian motion.
With Itô's lemma and formulas $(dt)^2=dtdW_t=dW_tdt=0$ and $(dW_t)^2=dt$, we can show that
$$ (dS_t)^2=\sigma^2 S_t^2 dt $$ Problem:
At the beginning of a demonstration, the author of an article uses the following equality: $$ (\int^T_0 dS_t)^2=\int^T_0 (dS_t)^2 $$ I can't see how he got such a result knowing that I find with Itô's lemma that : $$ (\int^T_0 dS_t)^2=\int^T_0 (dS_t)^2+2(S_0^2-S_0S_T+\int^T_0 S_tdS_t) $$ Help me see a little more clearly. Thank you in advance.