Let $X$ be a topological space.


Let $\gamma:[a,b]\to X$ be continuous and injective.


$\gamma$ is said to be "openly extendable" if there is $[a,b]\subset (a',b')$ and a continuous and injective curve $\gamma':(a',b')\to X$ with $\gamma'\vert\_{[a,b]} = \gamma$.


Under what conditions on $X$, all continuous injective curves are openly extendable?


I'm specifically interested in the case where $X$ is metrizable.



Extending continuous injective curves both continuously and injectively
~~**EDIT 1:** Fixed the mistakes and added a full proof below~~


**EDIT 4: Found how to prove the existence of a connected neighborhood.
I am satisfied with this proof, so I'll accept the answer**


**Theorem:** If $X$ is connected, ~~locally connected~~ **EDIT 4: locally path connected**, locally compact and metrizable and $x=\gamma(a)$ and $y=\gamma(b)$ are not isolated within $X-(Im(\gamma)^\mathrm{o})$ then $\gamma$ is openly extendable.


**Proof:**


First, we want to find a neighborhood $U\_x$ with $W:=U\_x-Im(\gamma)^\mathrm{o}$ being connected.


Let $V\_x$ be a path connected neighborhood of $x$ separated from $y$.
There are three cases:


1. If $V\_x-Im(\gamma)$ is connected then so is $V\_x-Im(\gamma)^\mathrm{o}$ (and as $X$ is locally path connected, this neighborhood is path connected).
2. If for every path connected component $Y$ of $V\_x-Im(\gamma)$ we have $x\in\partial Y$.
Let $y\in Y$ and let $W\_x$ be a path connected neighborhood of $x$, by our assumption, $W\_x\cap Y\neq\emptyset$ and therefore $x$ is connected by a path to every point in $W\_x$, therefore $Y\cup\{x\}$ is path connected. But as this is true for all $Y$ then $$\bigcup\_{Y}(Y\cup\{x\}) = V\_x\cup\{x\} = V\_x-Im(\gamma)^\mathrm{o}$$ is path connected (as a union of path connected spaces with non empty pairwise intersection).
3. Let $Y$ be a path connected component of $V\_x$ with $x\notin \partial Y$. $Y$ is closed, and $X$ is $T\_3$ which means there is a closed neighborhood $W\_x$ of $x$ with $W\_x\cap Y = \emptyset$.
Let $U\_x$ be a path connected neighborhood of $x$ within $W\_x$.
We assumed $x$ is not isolated within $X-(Im(\gamma)^{\mathrm{o}})$ which means there is at least one point $x\neq w\in W\_x-Im(\gamma)$. As $x\notin\bar{Y}$ we have $w\notin Y$.


Now let $Z$ be the path connected component of $w$ in $V\_x-Im(\gamma)$. But now $Z\cup\{x\}$ is path connected as $Z$ is, and $x,w\in W\_x$ which is path connected. But now $Z\cup\{x\} = Z - Im(\gamma)^\mathrm{o}$ is path connected as we wanted.


~~Let $U\_x$ be compact, connected neighborhood of $x$ (it exists because $X$ is locally compact and locally connected, and we can refine one neighborhood to satisfy both conditions).
**EDIT 2:** The fact that $U\_x-(Im(\gamma)^{\mathrm{o}})$ is connected is not obvious, here is the explanation:


Because $X$ is $T\_3$ we can choose a neighborhood which is seperated from every $\gamma([t,s])$ where $t\geq t\_0>0$ which makes $U\_x-(Im(\gamma)^{\mathrm{o}})$ connected (otherwise there's a closed $K\subset Im(\gamma)^\mathrm{o}$ which separates $U\_x$ and we know $x\notin K$ therefore it contains the image of an interval $\gamma([t,s])$ with $t>0$ and we can choose $t\_0$ to be smaller than this $t$).


**End of EDIT 2**~~
~~**EDIT 3:** Finding a $U\_x$ for which $U\_x-Im(\gamma)^\mathrm{o}$ is connected is not obvious, and the argument doesn't work without it. It seems like it is true, but I'm not sure how to prove it.~~ 


Due to the properties of $X$, $W$ is also metrizable, connected and locally connected, and as $X$ is Hausdorff we can choose $U\_x$ to be compact which means so is $W$ (as $W = U\_x \cap (Im(\gamma)^\mathrm{o})^\mathrm{c}$ is closed).


Therefore the space $W$ is metrizable, compact, connected, and locally connected. Therefore it satisfies the conditions of the [Hahn Mazurkiewicz theorem](https://en.wikipedia.org/wiki/Space-filling_curve#The_Hahn.E2.80.93Mazurkiewicz_theorem). Therefore it is a Peano space which is arcwise connected. We have $$U\_x\cap Im(\gamma)^c\neq\emptyset$$ becuase we assume $x$ is not isolated. Let $z\in U\_x - Im(\gamma)$


Let $g:[0,1]\to U\_x-Im(\gamma)^\mathrm{o}$ be an arc between $x$ and $z$, i.e. a continuous bijection satisfying $g(0)=x, g(1) = z$. Now $g\cdot \gamma$ is continuous and injective (as both components are injective and their ranges do not overlap except at the common point).


$X$ is $T\_3$, so let $V\_y$ be a neighborhood of $y$ not intersecting $U\_x$ ($U\_x$ is compact and therefore closed). Repeating the same process for $y$ within $V\_y$ extends $\gamma$ into a continuous injective $\gamma\cdot g'$ with $Im(g')\subset V\_y$.


Now $\gamma':=g\cdot\gamma\cdot g'$ is injective because $V\_y\cap Im(g) = \emptyset$


$Im(g)^\mathrm{o}, Im(g')^\mathrm{o}\neq\emptyset$ bacuase $X$ is locally connected, and therefore $\gamma'$ satisfies the conditions of the lemma.


**Remark:** Among other things, this condition implies $\gamma$ cannot be surjective.


