Opened 16 years ago
Closed 16 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:
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)
Change History (11)
comment:1 Changed 16 years ago by
Priority: | Normal → High |
---|---|
Version: | → FCKeditor 2.5 |
comment:2 Changed 16 years ago by
Keywords: | Confirmed added; html tag mediawiki removed |
---|---|
Priority: | High → Normal |
Changed 16 years ago by
Attachment: | 2481.patch added |
---|
comment:3 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:4 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
Looks good, but two things should be improved.
- In wfSajaxSearchSpecialTagFCKeditor() $wgRawHtml in not added to the list of global variables.
- In:
contextMenu.AddItem( 'MW_Special', 'Special Tag Properties' ) ;
I would change "Special Tag Properties" into "Edit HTML code".
Changed 16 years ago by
Attachment: | 2481_2.patch added |
---|
comment:5 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
Changed 16 years ago by
Attachment: | 2481_3.patch added |
---|
Changed 16 years ago by
Attachment: | icon_html.gif added |
---|
comment:6 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:7 Changed 16 years ago by
Keywords: | fixed added; Confirmed Review+ removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed with [2442]
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) {
} </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
</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]]