Opened 9 years ago

Closed 9 years ago

#2333 closed Bug (fixed)

'>' replace with '>' on safari and Opera

Reported by: Byeongweon Moon Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone: FCKeditor 2.6.4
Component: General Version: FCKeditor 2.5
Keywords: Review+ Cc:

Description

I found this bug on my google summer of code 2008 period. when I use fckeditor as moinmoin wiki's gui editor, sometimes document parser throw exception. When I insert '>' to editor area it change to '>' after FCKDataProcessor.ConvertToDataFormat executed. as I found, this behavior only happend on apple safari(3.1.1 on window xp. I couldn't test any other safari browser).

You can easily produce this bug using fckeditor's testcase.

  1. open _test/automated/tests/fckdataprocessor.html
  2. add new testcase end of testcases.
    function test_ConvertToDataFormat_Character_Transform()
    {
    	var dataProcessor = new FCKDataProcessor() ;
    
    	assertEquals(
    		'<p>&lt;&lt;GetText(Edit)&gt;&gt;</p>',
    		dataProcessor.ConvertToDataFormat( document.getElementById('xDiv3'), true, true ) ) ;
    }
    
  3. to test this testcase. add below html code inside of body tag
    <div id="xDiv3"><p>&lt;&lt;GetText(Edit)&gt;&gt;</p></div>
    
  4. then. run suite on safari.

attached file is testcase what I use and screeanshot of result.

  • Browser name and OS : Safari for window (3.1.1) and windows xp professional

Attachments (4)

fckdataprocessor.html (6.1 KB) - added by Byeongweon Moon 9 years ago.
testcase file for produce same bug
bug_test_on_safari.jpg (120.6 KB) - added by Byeongweon Moon 9 years ago.
screenshot of jsunit test result
xml_gt.html (1.0 KB) - added by Alfonso Martínez de Lizarrondo 9 years ago.
Simplified testcase
2333.patch (2.7 KB) - added by Alfonso Martínez de Lizarrondo 9 years ago.
Proposed patch

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by Byeongweon Moon

Attachment: fckdataprocessor.html added

testcase file for produce same bug

Changed 9 years ago by Byeongweon Moon

Attachment: bug_test_on_safari.jpg added

screenshot of jsunit test result

comment:1 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Summary: '&gt;' replace with '>' on safari(3.1.1:windows)'&gt;' replace with '>' on safari and Opera
Version: SVNFCKeditor 2.5

Opera 9.51 also has the same behavior

This seems really a problem in their implementation of XMLSerializer, I'm attaching a simplified testcase that just creates an XML object with such a text node and then tries to serialize it.

Changed 9 years ago by Alfonso Martínez de Lizarrondo

Attachment: xml_gt.html added

Simplified testcase

Changed 9 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2333.patch added

Proposed patch

comment:2 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added
Owner: set to Alfonso Martínez de Lizarrondo
Status: newassigned

According to http://www.w3.org/TR/REC-xml/#syntax that output it's correct, although we want all the browsers to have the same behavior, so the proposed patch does include the > in the list of special characters to handle.

I'm attaching also the automated testcase proposed by tasyblue

comment:3 Changed 9 years ago by Martin Kou

Milestone: FCKeditor 2.6.4

The patch looks good to me. I think we can have this Review+ed and committed in 2.6.4.

comment:4 Changed 9 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:5 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: assignedclosed

Fixed with [2359]

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy