I found this: Let $X$ be a compact space and $f:X \rightarrow Y$ a continuous injection. Let $f(X)$ be dense in $Y$. Prove that $f$ is a homeomorphism.
So, my question is: is it possible to prove that? I tried proving it and I couldn't, since Y is not necessarily a Hausdorff space.
The Hausdorff-condition is needed when proving that f is a closed mapping, but I guess you could do it some other way.