Confusion on the definition of a quotient map

Esran
Let X and Y be topological spaces; let p:X -> Y be a surjective map. The map p is said to be a quotient map provided a subset U of Y is open in Y if and only if p^-1(U) is open in X.

Let X be the subspace [0,1] U [2,3] of R, and let Y be the subspace [0,2] of R. The map p:X -> Y defined by p(x) = x for x in [0,1] and p(x) = x-1 for x in [2,3] is readily seen to be surjective, closed, and continuous. So, it's a quotient map.

Here's where my problem comes in. The image of the open set [0,1] is the subset [0,1] of Y. But [0,1] is not open in Y, yet its pullback is open in X. Doesn't this contradict that p is a quotient map? Is there something wrong with my definition?