Connected subspace of the product of topological spaces

Let $X$ and $Y$ be topological spaces. Is it true that any connected set of $X \times Y$ is of the form $A \times B$ where $A$ is connected subset of $X$, and $B$ is a connected subset of $Y$?

• what are your thoughts about the problem? – Loreno Heer Nov 9 '14 at 12:41
• You can find lots of counterexamples in $\Bbb R^2$. – Brian M. Scott Nov 9 '14 at 12:43

Hint: Is $S^1 \subset \mathbb{R}^2$ of the form $A \times B$?
No. For example, the L-shaped set in $\mathbb R\times\mathbb R$ that is the union of the line segments $[0,1]\times 0$ and $0\times[0,1]$ is not a product of sets in the component spaces.