launchd+targets/darwin: Escape XML in plists (#7356)
This patch updates all usage of toPlist such that it escapes any strings in the final output. The motication for this change is to avoid confusion when end-users of home-manager's APIs are not aware that the option values they set end up being passed un-escaped to XML files. BREAKING CHANGE: Consumers doing manual escaping will now be doubly escaped. Co-authored-by: Linnnus <linnnus@users.noreply.github.com>
This commit is contained in:
parent
cc2fa2331a
commit
3ec1cd9a07
8 changed files with 35 additions and 4 deletions
13
modules/misc/news/2025/07/2025-07-01_22-15-34.nix
Normal file
13
modules/misc/news/2025/07/2025-07-01_22-15-34.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
time = "2025-07-01T20:15:34+00:00";
|
||||
condition = pkgs.stdenv.hostPlatform.isDarwin;
|
||||
message = ''
|
||||
XML characters are escaped for 'targets.darwin.keybindings' and 'launchd.agents.<name>'.
|
||||
|
||||
Special characters used in strings passed to 'targets.darwin.keybindings'
|
||||
and 'launchd.agents.<name>' are now escaped before being included in the
|
||||
generated plist files. If you were doing manual escaping you will need to
|
||||
stop to avoid double escaping.
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue