Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions freewrite/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ struct ContentView: View {
let trimmedText = text.trimmingCharacters(in: .whitespacesAndNewlines)
let fullText = aiChatPrompt + "\n\n" + trimmedText

if let encodedText = fullText.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
if let encodedText = fullText.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)?.replacingOccurrences(of: "&", with: "%26"),
let url = URL(string: "https://chat.openai.com/?m=" + encodedText) {
NSWorkspace.shared.open(url)
}
Expand All @@ -1068,7 +1068,7 @@ struct ContentView: View {
let trimmedText = text.trimmingCharacters(in: .whitespacesAndNewlines)
let fullText = claudePrompt + "\n\n" + trimmedText

if let encodedText = fullText.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
if let encodedText = fullText.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)?.replacingOccurrences(of: "&", with: "%26"),
let url = URL(string: "https://claude.ai/new?q=" + encodedText) {
NSWorkspace.shared.open(url)
}
Expand Down Expand Up @@ -1305,4 +1305,4 @@ extension NSView {

#Preview {
ContentView()
}
}