Closed Bug 160132 Opened 22 years ago Closed 22 years ago

Need to strip linebreaks when pasting into url bar

Categories

(Camino Graveyard :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Chimera0.6

People

(Reporter: sfraser_bugs, Assigned: mikepinkerton)

Details

Attachments

(1 file, 2 obsolete files)

We need to strip CR/LF when pasting into the URL bar; we should either truncate at the linebreak, or just strip it out (preferred) so that pasting 'broken' urls works.
gor! i swear we used to do this
Status: NEW → ASSIGNED
Target Milestone: --- → Chimera0.4
./Navigator -url "http://spider/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=30000&auto=1" This brings up the browser with the url bar displaying "http://spider/page-" I also notice that TextEdit will break this url up at the same '-' place, I am guessing a similar behavior is happening here in the url bar. Is this the same bug, or should I file a new one?
Same bug.
After applying patch in bug 161621, I typed in a text editor the following lines: http://www. apple. com then copied & pasted it into the URL bar and hit return. Apple's homepage came up. So I think when the text view goes back to being a text field, this will be fixed.
Depends on: 161621
> then copied & pasted it into the URL bar and hit return What did it look like at this point? Did pasting remove linebreaks?
No longer depends on: 161621
Attached patch strips control characters (obsolete) (deleted) — Splinter Review
I felt bad that I said the text field would fix this when it didn't. So I made a patch which strips out control characters. Copying this: http: // www. apple. com and pasting into the URL bar results in a nice "http://www.apple.com" This patch requires the patch from bug 161621 to work. In fact, it's a patch of the patched CHAutoCompleteTextField.
can you explain this patch?
dave and i talked and he's going to come up with a new patch that doesn't impact regular typing (override paste: on the field editor).
Attached patch overrides paste (obsolete) (deleted) — Splinter Review
Subclassed the field editor we send to the URL bar, and overrode paste: I tried it with stickies & bbedit lite - so I think it works with both carbon & cocoa. I've left the interface & implementation of this subclass in BrowserWindowController.mm. Feel free to move it someplace else.
Attachment #95053 - Attachment is obsolete: true
Target Milestone: Chimera0.4 → Chimera0.6
Attached patch updated patch (deleted) — Splinter Review
updated for new naming scheme. subclassed NSTextView still living in the BWC - I wouldn't be surprised if you want it someplace else, but it's easy enough to move.
Attachment #95191 - Attachment is obsolete: true
landed with changes to the selection code.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You can still insert a line break with option-return, dunno if you want to trap it specifically or perhaps with a delegate method, perhaps -textView:shouldChangeTextInRange:replacementString: or whatever the textfield equivalent is.
V/fixed. Camino 0.8.1 Mike, this is great. Sometimes the larger group of contributors just don't get it (see how many bugs are duped to bug 23485 if you want to see how much pain you have saved Camino users.
Status: RESOLVED → VERIFIED
QA Contact: winnie → benc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: