diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-12-04 18:55:29 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-12-04 18:55:29 +0100 |
commit | 1794320dcfdfcd19572fb1676294f9853a6bbc20 (patch) | |
tree | a4c9e978947d6930d50391747382d7f95a5863e3 /sources/core/htmlparser | |
parent | 7183f6a6a21ad9124e70c997e0168459f377a9f2 (diff) | |
download | ludivine-ckeditor-component-master.tar.gz ludivine-ckeditor-component-master.tar.zst ludivine-ckeditor-component-master.zip |
Diffstat (limited to 'sources/core/htmlparser')
-rw-r--r-- | sources/core/htmlparser/basicwriter.js | 2 | ||||
-rw-r--r-- | sources/core/htmlparser/element.js | 6 | ||||
-rw-r--r-- | sources/core/htmlparser/fragment.js | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sources/core/htmlparser/basicwriter.js b/sources/core/htmlparser/basicwriter.js index 529fbf1..61447f0 100644 --- a/sources/core/htmlparser/basicwriter.js +++ b/sources/core/htmlparser/basicwriter.js | |||
@@ -67,7 +67,7 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( { | |||
67 | * @param {String} attValue The attribute value. | 67 | * @param {String} attValue The attribute value. |
68 | */ | 68 | */ |
69 | attribute: function( attName, attValue ) { | 69 | attribute: function( attName, attValue ) { |
70 | // Browsers don't always escape special character in attribute values. (#4683, #4719). | 70 | // Browsers don't always escape special character in attribute values. (http://dev.ckeditor.com/ticket/4683, http://dev.ckeditor.com/ticket/4719). |
71 | if ( typeof attValue == 'string' ) | 71 | if ( typeof attValue == 'string' ) |
72 | attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); | 72 | attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); |
73 | 73 | ||
diff --git a/sources/core/htmlparser/element.js b/sources/core/htmlparser/element.js index 0ed750e..224d3e6 100644 --- a/sources/core/htmlparser/element.js +++ b/sources/core/htmlparser/element.js | |||
@@ -35,7 +35,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) { | |||
35 | */ | 35 | */ |
36 | this.children = []; | 36 | this.children = []; |
37 | 37 | ||
38 | // Reveal the real semantic of our internal custom tag name (#6639), | 38 | // Reveal the real semantic of our internal custom tag name (http://dev.ckeditor.com/ticket/6639), |
39 | // when resolving whether it's block like. | 39 | // when resolving whether it's block like. |
40 | var realName = name || '', | 40 | var realName = name || '', |
41 | prefixed = realName.match( /^cke:(.*)/ ); | 41 | prefixed = realName.match( /^cke:(.*)/ ); |
@@ -543,8 +543,8 @@ CKEDITOR.htmlParser.cssStyle = function() { | |||
543 | 543 | ||
544 | if ( !ctx.nonEditable && this.attributes.contenteditable == 'false' ) | 544 | if ( !ctx.nonEditable && this.attributes.contenteditable == 'false' ) |
545 | changes.push( 'nonEditable', true ); | 545 | changes.push( 'nonEditable', true ); |
546 | // A context to be given nestedEditable must be nonEditable first (by inheritance) (#11372, #11698). | 546 | // A context to be given nestedEditable must be nonEditable first (by inheritance) (http://dev.ckeditor.com/ticket/11372, http://dev.ckeditor.com/ticket/11698). |
547 | // Special case: #11504 - filter starts on <body contenteditable=true>, | 547 | // Special case: http://dev.ckeditor.com/ticket/11504 - filter starts on <body contenteditable=true>, |
548 | // so ctx.nonEditable has not been yet set to true. | 548 | // so ctx.nonEditable has not been yet set to true. |
549 | else if ( ctx.nonEditable && !ctx.nestedEditable && this.attributes.contenteditable == 'true' ) | 549 | else if ( ctx.nonEditable && !ctx.nestedEditable && this.attributes.contenteditable == 'true' ) |
550 | changes.push( 'nestedEditable', true ); | 550 | changes.push( 'nestedEditable', true ); |
diff --git a/sources/core/htmlparser/fragment.js b/sources/core/htmlparser/fragment.js index f696a12..7ef915c 100644 --- a/sources/core/htmlparser/fragment.js +++ b/sources/core/htmlparser/fragment.js | |||
@@ -61,7 +61,7 @@ CKEDITOR.htmlParser.fragment = function() { | |||
61 | if ( node.attributes[ 'data-cke-survive' ] ) | 61 | if ( node.attributes[ 'data-cke-survive' ] ) |
62 | return false; | 62 | return false; |
63 | 63 | ||
64 | // Empty link is to be removed when empty but not anchor. (#7894) | 64 | // Empty link is to be removed when empty but not anchor. (http://dev.ckeditor.com/ticket/7894) |
65 | return node.name == 'a' && node.attributes.href || CKEDITOR.dtd.$removeEmpty[ node.name ]; | 65 | return node.name == 'a' && node.attributes.href || CKEDITOR.dtd.$removeEmpty[ node.name ]; |
66 | } | 66 | } |
67 | 67 | ||
@@ -130,7 +130,7 @@ CKEDITOR.htmlParser.fragment = function() { | |||
130 | i--; | 130 | i--; |
131 | } else { | 131 | } else { |
132 | // Some element of the same type cannot be nested, flat them, | 132 | // Some element of the same type cannot be nested, flat them, |
133 | // e.g. <a href="#">foo<a href="#">bar</a></a>. (#7894) | 133 | // e.g. <a href="#">foo<a href="#">bar</a></a>. (http://dev.ckeditor.com/ticket/7894) |
134 | if ( pendingName == currentNode.name ) | 134 | if ( pendingName == currentNode.name ) |
135 | addElement( currentNode, currentNode.parent, 1 ), i--; | 135 | addElement( currentNode, currentNode.parent, 1 ), i--; |
136 | } | 136 | } |
@@ -143,7 +143,7 @@ CKEDITOR.htmlParser.fragment = function() { | |||
143 | addElement( pendingBRs.shift(), currentNode ); | 143 | addElement( pendingBRs.shift(), currentNode ); |
144 | } | 144 | } |
145 | 145 | ||
146 | // Rtrim empty spaces on block end boundary. (#3585) | 146 | // Rtrim empty spaces on block end boundary. (http://dev.ckeditor.com/ticket/3585) |
147 | function removeTailWhitespace( element ) { | 147 | function removeTailWhitespace( element ) { |
148 | if ( element._.isBlockLike && element.name != 'pre' && element.name != 'textarea' ) { | 148 | if ( element._.isBlockLike && element.name != 'pre' && element.name != 'textarea' ) { |
149 | 149 | ||
@@ -275,10 +275,10 @@ CKEDITOR.htmlParser.fragment = function() { | |||
275 | // If the element cannot be child of the current element. | 275 | // If the element cannot be child of the current element. |
276 | if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) { | 276 | if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) { |
277 | // Current node doesn't have a close tag, time for a close | 277 | // Current node doesn't have a close tag, time for a close |
278 | // as this element isn't fit in. (#7497) | 278 | // as this element isn't fit in. (http://dev.ckeditor.com/ticket/7497) |
279 | if ( currentNode.isOptionalClose ) | 279 | if ( currentNode.isOptionalClose ) |
280 | parser.onTagClose( currentName ); | 280 | parser.onTagClose( currentName ); |
281 | // Fixing malformed nested lists by moving it into a previous list item. (#3828) | 281 | // Fixing malformed nested lists by moving it into a previous list item. (http://dev.ckeditor.com/ticket/3828) |
282 | else if ( tagName in listBlocks && currentName in listBlocks ) { | 282 | else if ( tagName in listBlocks && currentName in listBlocks ) { |
283 | var children = currentNode.children, | 283 | var children = currentNode.children, |
284 | lastChild = children[ children.length - 1 ]; | 284 | lastChild = children[ children.length - 1 ]; |
@@ -291,7 +291,7 @@ CKEDITOR.htmlParser.fragment = function() { | |||
291 | currentNode = lastChild; | 291 | currentNode = lastChild; |
292 | } | 292 | } |
293 | // Establish new list root for orphan list items, but NOT to create | 293 | // Establish new list root for orphan list items, but NOT to create |
294 | // new list for the following ones, fix them instead. (#6975) | 294 | // new list for the following ones, fix them instead. (http://dev.ckeditor.com/ticket/6975) |
295 | // <dl><dt>foo<dd>bar</dl> | 295 | // <dl><dt>foo<dd>bar</dl> |
296 | // <ul><li>foo<li>bar</ul> | 296 | // <ul><li>foo<li>bar</ul> |
297 | else if ( tagName in CKEDITOR.dtd.$listItem && | 297 | else if ( tagName in CKEDITOR.dtd.$listItem && |
@@ -409,7 +409,7 @@ CKEDITOR.htmlParser.fragment = function() { | |||
409 | var currentName = currentNode.name, | 409 | var currentName = currentNode.name, |
410 | currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd; | 410 | currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd; |
411 | 411 | ||
412 | // Fix orphan text in list/table. (#8540) (#8870) | 412 | // Fix orphan text in list/table. (http://dev.ckeditor.com/ticket/8540) (http://dev.ckeditor.com/ticket/8870) |
413 | if ( !inTextarea && !currentDtd[ '#' ] && currentName in nonBreakingBlocks ) { | 413 | if ( !inTextarea && !currentDtd[ '#' ] && currentName in nonBreakingBlocks ) { |
414 | parser.onTagOpen( structureFixes[ currentName ] || '' ); | 414 | parser.onTagOpen( structureFixes[ currentName ] || '' ); |
415 | parser.onText( text ); | 415 | parser.onText( text ); |