Pier Angelo Vendrame pushed to branch tor-browser-102.6.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits: 221b7a49 by Henry Wilkes at 2023-01-10T10:21:09+00:00 fixup! Bug 40209: Implement Basic Crypto Safety
Bug 41539: Remove all whitespace from copied text before testing if it looks like a crypto address.
- - - - -
1 changed file:
- browser/actors/CryptoSafetyChild.jsm
Changes:
===================================== browser/actors/CryptoSafetyChild.jsm ===================================== @@ -74,7 +74,7 @@ class CryptoSafetyChild extends JSWindowActorChild {
if (event.type == "copy" || event.type == "cut") { this.contentWindow.navigator.clipboard.readText().then(clipText => { - const selection = clipText.trim(); + const selection = clipText.replace(/\s+/g, ""); if (looksLikeCryptoAddress(selection)) { this.sendAsyncMessage("CryptoSafety:CopiedText", { selection,
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/221b7a49...