[PR #1165] [MERGED] Fix escaping in yaml strings #923

Closed
opened 2025-12-30 01:27:46 +01:00 by adam · 0 comments
Owner

📋 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: mainHead: fix-yaml-escaping


📝 Commits (2)

📊 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:

  • backslash
  • next line (0x85)
  • nbsp (0xa0)

Closes #1166


🔄 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>
adam added the pull-request label 2025-12-30 01:27:46 +01:00
adam closed this issue 2025-12-30 01:27:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#923