Make WordPress Core

Opened 20 years ago

Closed 20 years ago

#3462 closed enhancement (fixed)

Change in 'Add link' behaviour in RTE

Reported by: podz Owned by: skeltoac
Priority: lowest Milestone: 2.1
Component: Administration Version: 2.1
Severity: minor Keywords: has-patch commit
Cc: Focuses:

Description

At one time, when you inserted a link the "​http://" was already

highlighted, so you could just paste in the link you can copied from
the address bar, overlaying the "​http://" already there. Now this
"​http://" is no longer highlighted, so you have to backspace over it
to wipe it out before or after you paste in the link.

Was this a deliberate change and will it be reverted ?

(Apologies if this is the wrong place for this)

Attachments (1)

select-http-when-linking.diff​ (599 bytes ) - added by markjaquith 20 years ago.
Patch for trunk, highlights ​http://

Download all attachments as: .zip

Change History (8)

#1 @Viper007Bond
20 years ago

  • Milestone 2.2 → 2.1
  • Priority normal → lowest
  • Severity normal → minor
  • Type defect → enhancement
  • Version → 2.1

I think you're thinking of when the RTE is off and it's just a standard JS prompt. In 2.0.5, there's nothing in the URL box. ;)

However, this should be easy to do if it's generally agreed that we want this. :)

#2 @podz
20 years ago

In that case I was wrong - it's in 2.1a

#3 @markjaquith
20 years ago

  • Owner changed from anonymous to markjaquith
  • Status new → assigned

+1 for highlighting it. anything that kills paste ability is bad. BUT, we could also check for double ​http:// or ​https:// on the backend like so:

$url = preg_replace('|^http(s)?://http(s)?://|', 'http$2://', $url);

I see people doing that ALL the time, so this could be once of those nice "it just works" features. Even with highlighting, people are going to get it wrong sometimes.

#4 @foolswisdom
20 years ago

Note: this new behavior was introduced to RTE by ticket:2579 (dupl #3192) r4597 a week ago, but that added the '​http://', it was not previously there nor highlighted.

+1 selected

@markjaquith
20 years ago

Patch for trunk, highlights ​http://

#5 @markjaquith
20 years ago

  • Keywords has-patch added
  • Owner changed from markjaquith to skeltoac
  • Status assigned → new

Patch uploaded. Seems to work. I'll wait for Andy's +1 on the patch before it goes in, however.

#6 @andy
20 years ago

  • Keywords commit added

Lovely!

#7 @ryan
20 years ago

  • Resolution → fixed
  • Status new → closed

(In [4642]) Select http when linking. Props markjaquith. fixes #3462

Note: See TracTickets for help on using tickets.