mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 513648: strip embedded newlines and whitespace when middleclick-pasting URLs, r+a=gavin
--HG-- extra : rebase_source : 7c1ef8fabde83c284c123d758484abd22dd4eb33
This commit is contained in:
parent
ceff7bd2aa
commit
36b954ef07
@ -5167,7 +5167,15 @@ function handleLinkClick(event, href, linkNode) {
|
||||
}
|
||||
|
||||
function middleMousePaste(event) {
|
||||
var url = getShortcutOrURI(readFromClipboard());
|
||||
let clipboard = readFromClipboard();
|
||||
if (!clipboard)
|
||||
return;
|
||||
|
||||
// Strip embedded newlines and surrounding whitespace, to match the URL
|
||||
// bar's behavior (stripsurroundingwhitespace)
|
||||
clipboard.replace(/\s*\n\s*/g, "");
|
||||
|
||||
let url = getShortcutOrURI(clipboard);
|
||||
try {
|
||||
makeURI(url);
|
||||
} catch (ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user