Suppose $X$ is a Hausdorff topological space (or metric space if you like) and $f:[0,1]\to X$ is any non-constant path. It could be that $f$ is constant on a closed interval $[a,b]$, and it is possible to collapse this interval to a point in $[0,1]$ and get a path (by the universal property of quotient spaces) which has "fewer" intervals where it is constant.
However, it's possible that $f$ is constant on infinitely many closed intervals. I'd like to be able to replace $f$ with a path $f'$ that is not constant on any interval.
Is there always a monotone and onto function $m:[0,1]\to [0,1]$ and path $f':[0,1]\to X$ which is not constant on any interval such that $f'\circ m=f$? It seems like the obvious thing to do would be to collapse all intervals on which $f$ is constant to points, but it is not obvious to me that the resulting quotient is always $[0,1]$. Is there some result in the theory of Peano spaces which makes this really easy?