mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Fix typo and whitespace issues
This commit is contained in:
parent
c5a7c622fe
commit
ede1991931
1 changed files with 6 additions and 6 deletions
|
@ -1965,7 +1965,7 @@ proto.insertHTML = function ( html, isPaste ) {
|
|||
return this;
|
||||
};
|
||||
|
||||
var escapeHTMLFragement = function ( text ) {
|
||||
var escapeHTML = function ( text ) {
|
||||
return text.split( '&' ).join( '&' )
|
||||
.split( '<' ).join( '<' )
|
||||
.split( '>' ).join( '>' )
|
||||
|
@ -2015,14 +2015,14 @@ proto.insertPlainText = function ( plainText, isPaste ) {
|
|||
|
||||
for ( attr in attributes ) {
|
||||
openBlock += ' ' + attr + '="' +
|
||||
escapeHTMLFragement( attributes[ attr ] ) +
|
||||
escapeHTML( attributes[ attr ] ) +
|
||||
'"';
|
||||
}
|
||||
openBlock += '>';
|
||||
|
||||
for ( i = 0, l = lines.length; i < l; i += 1 ) {
|
||||
line = lines[i];
|
||||
line = escapeHTMLFragement( line ).replace( / (?= )/g, ' ' );
|
||||
line = escapeHTML( line ).replace( / (?= )/g, ' ' );
|
||||
// Wrap each line in <div></div>
|
||||
lines[i] = openBlock + ( line || '<BR>' ) + closeBlock;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue