#310 XML: treat - (minus) as a special char

open
Eric Le Lay
XML (6)
5
2012-09-03
2012-09-03
Jarek Czekalski
No

"--" string is not permitted inside a comment. So I suggest to treat "-" as a special character. That would make it possible to use "Characters to Entities" to escape such strings. That's the goal of using "Characters to Entites", to convert characters that make problems in parsing into correct xml code.

I have 3 ideas, but don't know which would be best for the plugin:

1. treat "-" always as a special char and replace it with -
2. treat "-" as special only after another "-"
3. treat "-" as special if configured so

In any case Entites to Characters should replace the entity with original character.

Without this functionality a common problem I meet is ant scripts with exec call, with arguments like --output. These commands are impossible to comment out.

Discussion