javascript split and url encoding
<p>I have a string of a url:</p>

<pre><code>var url = "/_imgs/media/image/Picture%201.png"
</code></pre>

<p>When I try to split it lke:</p>

<pre><code>var path = url.split('image/');
console.log(path);
</code></pre>

<p>gives:</p>

<pre><code>["/_imgs/media/", "Picture%201.png"]
</code></pre>

<p>ok fine, but when I do</p>

<pre><code>console.log(path[1]);
</code></pre>

<p>I get:</p>

<pre><code>/Picture%png
</code></pre>

<p>What is happening here?</p>
