mirror of
https://github.com/fastmail/Squire.git
synced 2025-01-03 13:16:31 -05:00
Don't change encoding of URL in Squire#makeLink.
Presume the URL is already valid, otherwise we could end up double encoding.
This commit is contained in:
parent
e108c18c38
commit
eed472b5ef
3 changed files with 1 additions and 3 deletions
|
@ -3356,7 +3356,6 @@ proto.removeSubscript = command( 'changeFormat', null, { tag: 'SUB' } );
|
||||||
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
||||||
|
|
||||||
proto.makeLink = function ( url ) {
|
proto.makeLink = function ( url ) {
|
||||||
url = encodeURI( url );
|
|
||||||
var range = this.getSelection();
|
var range = this.getSelection();
|
||||||
if ( range.collapsed ) {
|
if ( range.collapsed ) {
|
||||||
var protocolEnd = url.indexOf( ':' ) + 1;
|
var protocolEnd = url.indexOf( ':' ) + 1;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2243,7 +2243,6 @@ proto.removeSubscript = command( 'changeFormat', null, { tag: 'SUB' } );
|
||||||
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
||||||
|
|
||||||
proto.makeLink = function ( url ) {
|
proto.makeLink = function ( url ) {
|
||||||
url = encodeURI( url );
|
|
||||||
var range = this.getSelection();
|
var range = this.getSelection();
|
||||||
if ( range.collapsed ) {
|
if ( range.collapsed ) {
|
||||||
var protocolEnd = url.indexOf( ':' ) + 1;
|
var protocolEnd = url.indexOf( ':' ) + 1;
|
||||||
|
|
Loading…
Reference in a new issue