symfony/symfony — Issue #3432: [YAML] Parsing unescape some characters when it shouldn't
Author: Dentxinho
Created: 2012-02-23 17:10:16+00:00
State: open

I have a fresh checkout of symfony-standard master branch and vendors installed. The root of the project is **scpsf**.
When i browse web/app_dev.php, i get a exception screen saying this:

> Cannot import resource "C:\wamp\www\scpsf[specialcharacter]pp/config/routing_dev.yml" from "C:\wamp\www\scpsf\app/cache/dev/assetic/routing.yml".

_note that there is a special character between `scpsf` and `pp/config`. It should be a `\a` or `/a` instead._

Looking at this file in cache, routing.yml, there's nothing wrong with it, look:

```yml
# generated by assetic
# do not edit this file
_assetic: { resource: ., type: assetic }
_app: { resource: "C:\wamp\www\scpsf\app/config/routing_dev.yml" }
```

Then i guessed the problem should be the `\a` in the resource path, so i've changed it to `C:\wamp\www\scpsf/app/config/routing_dev.yml` and it worked like a charm.

To be sure that i've found the problem, i've cleared the cache and changed my project root to __ascpsf__. It was not a surprise to get this exception screen:

> Cannot import resource "C:\wamp\www[specialcharacter]scpsf[specialcharacter]pp/config/routing_dev.yml" from "C:\wamp\www\scpsf\app/cache/dev/assetic/routing.yml".

_note two special characters._

Digging into the code, I've found that YAML parsing proccess calls the `Unescaper` method `unescapeDoubleQuotedString` which calls `unescapeCharacter` that matches `\a` and others like a escaped character.

As you may figured out, i'm using Windows.

Sorry if i'm wrong, but this might be related to #173.