Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Resolved
-
1.2.3
-
None
Description
The backslash character is overloaded for use as a continuation delimiter as well as an escape character. However, the parsing logic does not presently handle this character consistently, which prevents the use of odd numbers of backslashes at the end of values. Here is a matrix of examples:
Original value | Parsed value | Notes |
---|---|---|
key=value\ |
key=value |
Backslash treated as continuation delimiter |
key=value\\ |
key=value\\ |
Backslashes treated as literal characters |
key=value\\\ |
key=value\\ |
Final backslash treated as continuation delimiter, other backslashes treated as literal characters |
key=value\\\\ |
key=value\\\\ |
Backslashes treated as literal characters |
There is a comment in Ini.Section#isContinued(String) that states:
//find the number of backslashes at the end of the line. If an even number, the
//backslashes are considered escaped. If an odd number, the line is considered continued on the next line
However, there is no unescaping logic in either Ini.Section#toMapProps(String) (which calls #isContinued) or IniSection#splitKeyValue(String).