diff --git a/src/Surface.zig b/src/Surface.zig index 1307127ad..3117a4dbe 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1165,7 +1165,7 @@ pub fn keyCallback( /// if bracketed mode is on this will do a bracketed paste. Otherwise, /// this will filter newlines to '\r'. pub fn textCallback(self: *Surface, text: []const u8) !void { - try self.completeClipboardPaste(text, false); + try self.completeClipboardPaste(text, true); } pub fn focusCallback(self: *Surface, focused: bool) !void { diff --git a/src/apprt/embedded.zig b/src/apprt/embedded.zig index c248c054d..b7ae1c6ee 100644 --- a/src/apprt/embedded.zig +++ b/src/apprt/embedded.zig @@ -1360,7 +1360,8 @@ pub const CAPI = struct { if (str_len == 0) return; const str = str_ptr[0..str_len]; - ptr.core_surface.completeClipboardRequest(state.*, str, false) catch |err| { + // TODO: Support sanaization for MacOS (force: false) + ptr.core_surface.completeClipboardRequest(state.*, str, true) catch |err| { log.err("error completing clipboard request err={}", .{err}); return; }; diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index 044da8e98..83be181ef 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -589,7 +589,8 @@ pub const Surface = struct { }; // Complete our request - try self.core_surface.completeClipboardRequest(state, str, false); + // TODO: Support sanaization for GLFW (force: false) + try self.core_surface.completeClipboardRequest(state, str, true); } /// Set the clipboard.