9f308fadd2
Rotate AI idle suggestions with optional remote packs, move history/dictionary onto self-sizing Home preview cards, harden clipboard capture/prompting, and simplify keyboard chrome by dropping most liquid-glass shadows.
18 lines
540 B
Swift
18 lines
540 B
Swift
// PromptXMLEscaping.swift
|
|
// OSGKeyboard · Shared
|
|
//
|
|
// Escapes untrusted prompt data embedded in XML-like text nodes.
|
|
|
|
import Foundation
|
|
|
|
enum PromptXMLEscaping {
|
|
static func escapeTextContent(_ text: String) -> String {
|
|
text
|
|
.replacingOccurrences(of: "&", with: "&")
|
|
.replacingOccurrences(of: "<", with: "<")
|
|
.replacingOccurrences(of: ">", with: ">")
|
|
.replacingOccurrences(of: "\"", with: """)
|
|
.replacingOccurrences(of: "'", with: "'")
|
|
}
|
|
}
|