|
562 | 562 | }
|
563 | 563 | },
|
564 | 564 |
|
| 565 | + // #13292 |
| 566 | + 'test protected source in attribute in self-closing tag': function() { |
| 567 | + var processor = this.editor3.dataProcessor, |
| 568 | + source = '<p><img src="[[image]]"/></a></p>', |
| 569 | + expectedHtml = '<p><img data-cke-saved-src="{cke_protected_1}" src="{cke_protected_1}" /></p>', |
| 570 | + expectedOutput = '<p><img src="[[image]]" /></p>'; |
| 571 | + |
| 572 | + var html = processor.toHtml( source ); |
| 573 | + |
| 574 | + assert.isInnerHtmlMatching( expectedHtml, html, 'toHtml' ); |
| 575 | + |
| 576 | + assert.areSame( expectedOutput, processor.toDataFormat( html ), 'toDataFormat' ); |
| 577 | + }, |
| 578 | + |
| 579 | + // #11754 |
| 580 | + 'test malformed HTML does not hang the processor': function() { |
| 581 | + var processor = this.editor.dataProcessor, |
| 582 | + source = '<table border=0 cellspacing=0 cellpadding=0 style=\'border-collapse:collapse;></table>', |
| 583 | + expectedHtml = '@'; |
| 584 | + |
| 585 | + assert.isInnerHtmlMatching( expectedHtml, processor.toHtml( source ) ); |
| 586 | + }, |
| 587 | + |
| 588 | + // #11846 |
| 589 | + 'test malformed HTML does not hang the processor 2': function() { |
| 590 | + var processor = this.editor.dataProcessor, |
| 591 | + source = |
| 592 | + '<span id="sample" overflow="hidden" ;"="" style="font-size:8pt; font-weight:normal; ' + |
| 593 | + 'font-style:normal; color:#808080; background:transparent">Text</span>'; |
| 594 | + |
| 595 | + processor.toHtml( source ); |
| 596 | + assert.isTrue( true, 'happy to be here' ); |
| 597 | + }, |
| 598 | + |
565 | 599 | // Some elements should not have protected source markup inside. (#11223)
|
566 | 600 | 'test protected source in title': addProtectedSourceTC( '<p>[[mytag]]</p>', '[[mytag]]' ),
|
567 | 601 | 'test protected source in iframe': addProtectedSourceTC( '<p><iframe name="aa">[[mytag]]</iframe></p>' ),
|
|
0 commit comments