Let $X$ be an irreducible variety. Then any open set $U\subset X$ is dense. Thus $U$ is irreducible as topological space. Consider $O_X(U)$ sheaf of regular functions on $U$.
If $U'\subset U$ is open in $U$, is $O_X(U)\to O_X(U')$ injective?
I think it is the case, if $f\in O_X(U)$ is sent to $0\in O_X(U')$, then $f|_{U'}=0$. So $U'\subset V(f)$ and $U=(U-U')\cup V(f)$. Clearly $V(f)=U$ by $U$ irreducible. Thus $f|_U=0$.
This is related to Extending regular function on normal variety from a subvariety of codimension 2. In this post, @MooS Answer says we know $\cap_{ht(p)=1}A_p=A$ implies restriction map injectivity. However this theorem requires normal variety. An irreducible variety is always normal?