Opened 11 years ago

Closed 11 years ago

#2481 closed Bug (fixed)

<html> tag is improperly processed in 2.5 SVN for MediaWiki

Reported by: Peter Koppstein Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version: FCKeditor 2.5
Keywords: fixed Cc:

Description

Example:

<html><a href=foo "style=color:red;">hello</a></html>

is converted to:

hello?

It should be left alone.

This has been a problem for some time, and can be demonstrated e.g. in 2.5 SVN build 19965.

Attachments (4)

2481.patch (4.5 KB) - added by Artur Formella 11 years ago.
2481_2.patch (4.2 KB) - added by Artur Formella 11 years ago.
2481_3.patch (4.2 KB) - added by Artur Formella 11 years ago.
icon_html.gif (932 bytes) - added by Artur Formella 11 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 11 years ago by Peter Koppstein

Priority: NormalHigh
Version: FCKeditor 2.5

The example in the previous writeup doesn't indicate how serious the problem is. Here is a better example, which shows that most of the text within <html>...</html> is lost (for example, the entire <script>...</script> segment is lost), and that the result does not properly capture the javascript calls (i.e. the result is the wikilink [[javascript:...]] rather than the more plausible hyperlink [javascript:...]).

Here is the original:

<html> <script> function changeCalendarFrame(newsrc) {

parent.document.getElementById("CalendarFrame").src=newsrc;

} </script> <iframe id="CalendarFrame" width="100%" height=400 src="http://www.princeton.edu/~ina"> [Your user agent does not support frames or is currently configured not to display frames.] However, you may visit

<A href=http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid={{{1}}}>the related document.</A>]

</iframe>

<body> <a href="javascript:changeCalendarFrame('http://www.google.com')">PRESS HERE TO CHANGE THE FRAME TO google</a> <p/> <a href="javascript:changeCalendarFrame('http://isaacnewton.princeton.edu/index.php?title=MG&printable=yes')">PRESS HERE TO CHANGE THE FRAME TO MG</a> <p/> <a href="javascript:alert('Hello')">PRESS HERE TO ALERT</a> </body> </html>

AND here is the result using Version 2.5 SVN Build 20055:

[[javascript:changeCalendarFrame('http://www.google.com')|PRESS HERE TO CHANGE THE FRAME TO google]]

[[javascript:changeCalendarFrame('http://isaacnewton.princeton.edu/index.php?title=MG&printable=yes')|PRESS HERE TO CHANGE THE FRAME TO MG]]

[[javascript:alert('Hello')|PRESS HERE TO ALERT]]

comment:2 Changed 11 years ago by Wiktor Walc

Keywords: Confirmed added; html tag mediawiki removed
Priority: HighNormal

Changed 11 years ago by Artur Formella

Attachment: 2481.patch added

comment:3 Changed 11 years ago by Artur Formella

Keywords: Review? added

comment:4 Changed 11 years ago by Wiktor Walc

Keywords: Review- added; Review? removed

Looks good, but two things should be improved.

  1. In wfSajaxSearchSpecialTagFCKeditor() $wgRawHtml in not added to the list of global variables.
  1. In:
    contextMenu.AddItem( 'MW_Special', 'Special Tag Properties' ) ; 
    

I would change "Special Tag Properties" into "Edit HTML code".

Changed 11 years ago by Artur Formella

Attachment: 2481_2.patch added

comment:5 Changed 11 years ago by Artur Formella

Keywords: Review? added; Review- removed

Changed 11 years ago by Artur Formella

Attachment: 2481_3.patch added

Changed 11 years ago by Artur Formella

Attachment: icon_html.gif added

comment:6 Changed 11 years ago by Wiktor Walc

Keywords: Review+ added; Review? removed

comment:7 Changed 11 years ago by Artur Formella

Keywords: fixed added; Confirmed Review+ removed
Resolution: fixed
Status: newclosed

Fixed with [2442]

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