Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid plist are parsed without failing, which results on invalid build() #87

Closed
trufae opened this issue Jan 11, 2018 · 3 comments
Closed

Comments

@trufae
Copy link
Contributor

trufae commented Jan 11, 2018

Related to #86

var p = require('./');

var o = p.parse(`
<plist>
<dict>
  <key>test</key>
  <string>Testing</string>
  <key>bar</key>
  <int></int>
</dict>
</plist>
`);

console.log(p.build(o));

this code runs fine but generates an invalid plist, it should throw or fill a default value, or drop the key

current output is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>test</key>
    <string>Testing</string>
    <key>bar</key>
  </dict>
</plist>

NOTE: see the missing value for the bar key

@trufae
Copy link
Contributor Author

trufae commented Jan 11, 2018

Fixed in #88

@mreinstein mreinstein mentioned this issue Aug 27, 2021
@mreinstein
Copy link
Collaborator

@trufae safe to close this one?

@trufae
Copy link
Contributor Author

trufae commented Apr 26, 2022

Yes

@trufae trufae closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants