Generalizing Dejan Govc's answer...
In this paper http://www.ams.org/journals/proc/1972-032-02/S0002-9939-1972-0296913-7/S0002-9939-1972-0296913-7.pdf it is shown that every continuous function from a connected and locally connected space into a connected space with a dispersion point is constant. (It's actually not that hardIt's easy to prove, I did it in about 5 minutes before reading the paper) actually.