Skip to content

Fix: Additional unicode characters getting added to pinned items#1376

Open
batsdk wants to merge 1 commit into
p0deje:masterfrom
batsdk:master
Open

Fix: Additional unicode characters getting added to pinned items#1376
batsdk wants to merge 1 commit into
p0deje:masterfrom
batsdk:master

Conversation

@batsdk
Copy link
Copy Markdown

@batsdk batsdk commented Apr 12, 2026

Fix unicode/garbled text on paste from browsers and Notes

Two fixes:

  1. Clipboard.swift — strips metadata-only pasteboard types (Chrome's customWebKitPasteboardData, chromiumSourceToken, Notes' notesRichText, etc.) before storing. These tags travel alongside the real content but
    confuse paste targets, producing garbled or extra characters.
  2. History.swift — deep-copies HistoryItemContent objects when merging a duplicate item, instead of sharing the reference. The old item is deleted from Core Data immediately after, which was silently invalidating the
    shared content objects and leaving the new item with blank/corrupted data.

Copy link
Copy Markdown
Collaborator

@weisJ weisJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on what issue this is solving?

Comment thread Maccy/Clipboard.swift

types = types
.subtracting(disabledTypes)
.subtracting(metadataTypes)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maccy deliberatly doesn't strip these types unless pasting without formatting is enabled. Some of those are needed for specific features for the relevant applications to function properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants