-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib.generators.toPlist: Make escaping optional as per PR comment
As discussed, this patch makes the following changes: 1. Escaping is only done when called with `{ escape = true; }`. 2. A warning is emitted if `{ escape = false; }` 3. Escaping is disabled by default, retaining backwards compatibility. I have also added a test case for both the escaped and non-escaped usage.
- Loading branch information
Showing
4 changed files
with
88 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>nested</key> | ||
<dict> | ||
<key>values</key> | ||
<dict> | ||
<key>attrs</key> | ||
<dict> | ||
<key>foo b/ar</key> | ||
<string>baz</string> | ||
</dict> | ||
<key>bool</key> | ||
<true/> | ||
<key>emptyattrs</key> | ||
<dict> | ||
|
||
</dict> | ||
<key>emptylist</key> | ||
<array> | ||
|
||
</array> | ||
<key>emptystring</key> | ||
<string></string> | ||
<key>float</key> | ||
<real>0.133700</real> | ||
<key>int</key> | ||
<integer>42</integer> | ||
<key>keys are not <escaped></key> | ||
<string>and < neither are string values</string> | ||
<key>list</key> | ||
<array> | ||
<integer>3</integer> | ||
<integer>4</integer> | ||
<string>test</string> | ||
</array> | ||
<key>newlinestring</key> | ||
<string> | ||
</string> | ||
<key>path</key> | ||
<string>/foo</string> | ||
<key>string</key> | ||
<string>fn${o}"r\d</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |