mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Default to allowing URIs with unknown protocols
This commit is contained in:
parent
601043f020
commit
a8f07d9adb
3 changed files with 7 additions and 5 deletions
|
@ -2606,6 +2606,7 @@ var proto = Squire.prototype;
|
||||||
var sanitizeToDOMFragment = function ( html, isPaste, self ) {
|
var sanitizeToDOMFragment = function ( html, isPaste, self ) {
|
||||||
var doc = self._doc;
|
var doc = self._doc;
|
||||||
var frag = html ? DOMPurify.sanitize( html, {
|
var frag = html ? DOMPurify.sanitize( html, {
|
||||||
|
ALLOW_UNKNOWN_PROTOCOLS: true,
|
||||||
WHOLE_DOCUMENT: false,
|
WHOLE_DOCUMENT: false,
|
||||||
RETURN_DOM: true,
|
RETURN_DOM: true,
|
||||||
RETURN_DOM_FRAGMENT: true
|
RETURN_DOM_FRAGMENT: true
|
||||||
|
@ -3062,9 +3063,9 @@ proto._updatePath = function ( range, force ) {
|
||||||
this.fireEvent( 'pathChange', { path: newPath } );
|
this.fireEvent( 'pathChange', { path: newPath } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !range.collapsed ) {
|
this.fireEvent( range.collapsed ? 'cursor' : 'select', {
|
||||||
this.fireEvent( 'select' );
|
range: range
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// selectionchange is fired synchronously in IE when removing current selection
|
// selectionchange is fired synchronously in IE when removing current selection
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -152,6 +152,7 @@ var proto = Squire.prototype;
|
||||||
var sanitizeToDOMFragment = function ( html, isPaste, self ) {
|
var sanitizeToDOMFragment = function ( html, isPaste, self ) {
|
||||||
var doc = self._doc;
|
var doc = self._doc;
|
||||||
var frag = html ? DOMPurify.sanitize( html, {
|
var frag = html ? DOMPurify.sanitize( html, {
|
||||||
|
ALLOW_UNKNOWN_PROTOCOLS: true,
|
||||||
WHOLE_DOCUMENT: false,
|
WHOLE_DOCUMENT: false,
|
||||||
RETURN_DOM: true,
|
RETURN_DOM: true,
|
||||||
RETURN_DOM_FRAGMENT: true
|
RETURN_DOM_FRAGMENT: true
|
||||||
|
|
Loading…
Reference in a new issue