🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/1165
**Author:** [@bioball](https://github.com/bioball)
**Created:** 8/6/2025
**Status:** ✅ Merged
**Merged:** 8/6/2025
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `fix-yaml-escaping`
---
### 📝 Commits (2)
- [`8adb8aa`](https://github.com/apple/pkl/commit/8adb8aad439c8ec14d4c8e8f9b8c56259bd499a6) Fix escaping in yaml strings
- [`43ca12d`](https://github.com/apple/pkl/commit/43ca12dc103629f5cab2e1ace5bb824dc158b09f) Fix test
### 📊 Changes
**4 files changed** (+82 additions, -9 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-core/src/main/java/org/pkl/core/util/yaml/YamlEscaper.java` (+29 -7)
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/api/yamlRenderer9.yml.pkl` (+36 -0)
📝 `pkl-core/src/test/files/LanguageSnippetTests/input/api/yamlRendererStringsCompat.pkl` (+2 -2)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlRenderer9.yml` (+15 -0)
</details>
### 📄 Description
There are three characters that are currently not escaped, but should be when rendered in double-quoted strings:
* backslash
* next line (0x85)
* nbsp (0xa0)
Closes #1166
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/1165
Author: @bioball
Created: 8/6/2025
Status: ✅ Merged
Merged: 8/6/2025
Merged by: @bioball
Base:
main← Head:fix-yaml-escaping📝 Commits (2)
8adb8aaFix escaping in yaml strings43ca12dFix test📊 Changes
4 files changed (+82 additions, -9 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/util/yaml/YamlEscaper.java(+29 -7)➕
pkl-core/src/test/files/LanguageSnippetTests/input/api/yamlRenderer9.yml.pkl(+36 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/input/api/yamlRendererStringsCompat.pkl(+2 -2)➕
pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlRenderer9.yml(+15 -0)📄 Description
There are three characters that are currently not escaped, but should be when rendered in double-quoted strings:
Closes #1166
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.