kriswallsmith/assetic — pull request #683 by tristanlins (2014-12-02 21:29:11+00:00)
Title: Fix relative url rewrite with same parent directory.

Source path: `assets/css/prx_media_48.css`
```css
body {
background-image:url("../../../files/xyz/startseite/bg/BG_Start-Koblenz.jpg");
}
```

Target path: `assets/theme-plus/proxy.php/css/d6cc649c/prx_media_48.css`

File location: `files/xyz/startseite/bg/BG_Start-Koblenz.jpg`

Expected result: `../../../../../files/xyz/startseite/bg/BG_Start-Koblenz.jpg`
Current result: : `../../../files/xyz/startseite/bg/BG_Start-Koblenz.jpg`

The problem is, that both have the same parent directory.
The while loop remove the deepest directory from the path, if the source url start with `../`, but this will also remove leading `../` from the path, but `../` parts must be stacked!