In this link, Theorem 5, starting with "For the converse statement", the proof begins:
Let $X$ be a continuous local martingale. Set $\tau_n = \inf\{t : |X_t| \geq n\}$. Then $X^{\tau_n}$ is a local martingale bounded by $n$ and $\mathbb{E}[[X]_{\tau_n}] = \mathbb{E}[X^2_{\tau_n}] \leq n^2$.
I am confused about why $\mathbb{E}[[X]_{\tau_n}] = \mathbb{E}[X^2_{\tau_n}]$. By the definition of quadratic variation, $(X^{\tau_n})^2 - [X^{\tau_n}]$ is guaranteed to be a local martingale. Also, $[X^{\tau_n}]_t = [X]_{t\wedge \tau_n}$ a.s. for every $t$. But to get the desired equality, I think $(X^{\tau_n})^2 - [X^{\tau_n}]$ has to be a true martingale (and then optional stopping can be applied)?