0
Fork 0
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:
Neil Jenkins 2017-06-28 16:03:31 +10:00
parent 601043f020
commit a8f07d9adb
3 changed files with 7 additions and 5 deletions

View file

@ -2606,6 +2606,7 @@ var proto = Squire.prototype;
var sanitizeToDOMFragment = function ( html, isPaste, self ) {
var doc = self._doc;
var frag = html ? DOMPurify.sanitize( html, {
ALLOW_UNKNOWN_PROTOCOLS: true,
WHOLE_DOCUMENT: false,
RETURN_DOM: true,
RETURN_DOM_FRAGMENT: true
@ -3062,9 +3063,9 @@ proto._updatePath = function ( range, force ) {
this.fireEvent( 'pathChange', { path: newPath } );
}
}
if ( !range.collapsed ) {
this.fireEvent( 'select' );
}
this.fireEvent( range.collapsed ? 'cursor' : 'select', {
range: range
});
};
// selectionchange is fired synchronously in IE when removing current selection

File diff suppressed because one or more lines are too long

View file

@ -152,6 +152,7 @@ var proto = Squire.prototype;
var sanitizeToDOMFragment = function ( html, isPaste, self ) {
var doc = self._doc;
var frag = html ? DOMPurify.sanitize( html, {
ALLOW_UNKNOWN_PROTOCOLS: true,
WHOLE_DOCUMENT: false,
RETURN_DOM: true,
RETURN_DOM_FRAGMENT: true