Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#7182 closed defect (fixed)

Editor: link dialog should insert http:// if user doesn't type it

Reported by: bill Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.4
Component: Editor Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

In 1.0, the link dialog inserts http:// when the user doesn't type it, so that typing "www.dojotoolkit.org" into the dialog produces a valid URL.

See http://bugs.dojotoolkit.org/browser/dijit/trunk/_editor/plugins/LinkDialog.js?rev=11172

 getValue: function(){
    if(!/^(https?|ftps?)/.test(this.textbox.value)){
        this.textbox.value="http://"+this.textbox.value;
    }
    return this.textbox.value;
}

This regressed in 1.1, and should be added back.

The negative side is that if a site wants to allow users insert a relative URL they need to customize that plugin or write their own. But I'm OK w/that restriction since in that case almost all the time there should be a different kind of dialog, querying the server for available choices.

Change History (13)

comment:1 Changed 11 years ago by bill

PS: seems like it would be easier/more portable to test for : but anything is OK w/me.

comment:2 Changed 11 years ago by Adam Peller

Milestone: 1.3tbd

comment:3 Changed 11 years ago by Adam Peller

Milestone: tbd1.3

comment:4 Changed 11 years ago by bill

Milestone: 1.31.4

1.3rc1 has been release; bumping remaining tickets to 1.4 (except for documentation/testing tickets)

comment:5 Changed 10 years ago by Adam Peller

Owner: changed from Adam Peller to Jared Jurkiewicz

comment:6 Changed 10 years ago by bill

This regressed in [12335] when the UrlTextBox was removed.

comment:7 Changed 10 years ago by Jared Jurkiewicz

(In [20304]) Many fixes to the old LinkDialog?. refs #7182

comment:8 Changed 10 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [20305]) Unit tests for LinkDialog?. fixes #7182

comment:9 Changed 10 years ago by Jared Jurkiewicz

(In [20307]) Unit tests for LinkDialog?, timing tweaks. fixes #7182

comment:10 Changed 10 years ago by Jared Jurkiewicz

(In [20333]) Remove a console.log from the UT. refs #7182

comment:11 Changed 10 years ago by Adam Peller

(In [20835]) reuse buttonCancel string resource. Refs #7182 !strict

comment:12 Changed 10 years ago by Adam Peller

(In [20836]) remove html jargon, for now. Refs #7182

comment:13 Changed 10 years ago by Adam Peller

(In [20837]) oops. remove debugger stmt. Refs #7182

Note: See TracTickets for help on using tickets.