Let $X$ be a Hausdorff space such that the irrationals $\mathbb P$ (in their usual topology) form a dense subspace of $X$.
Let $C$ be the Cantor set. The set of "non-endpoints" of $C$ is homeomorphic to $\mathbb P$.
Question. If $f:C\to X$ is a continuous surjection such that $f\restriction \mathbb P$ is the identity map, then is $X$ necessarily disconnected?
NOTE: I suppose we could ask the same question with $\mathbb P$ replaced with the rationals $\mathbb Q$ (identifying the endpoints of $C$ with $\mathbb Q$).