Ticket #2544 (closed Bug: invalid)

Opened 6 years ago

Last modified 2 years ago

& links converting to &

Reported by: ckool Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version: SVN (FCKeditor) - Retired
Keywords: Cc:

Description

Creating a link as follows: www.aaa.com?var=1&var=2&var=3 generates the next source code: <a href="http://www.aaa.com?var=1&amp;var=2&amp;var=3">

The problem happens when you put "&amp;" instead "&" in the links, (www.aaa.com?var=1&amp;var=2&amp;var=3) then the source code is as follows: <a href="http://www.aaa.com?var=1&amp;amp;var=2&amp;amp;var=3">

it doesn't checks if the &amp; is already writed therefore it replace '&' per '&amp;' resulting '&amp;amp;'

this happens in IE6 and FF3 (didn't try other browsers)

Change History

comment:1 Changed 6 years ago by screwtape

I found something similar, in that any ampersand '&' between opening and closing <ref> tags gets repetitively encoded from '&' to '&amp;' with each switch between source and wysiwyg mode, so the first time it is '<ref>This & That</ref>', then '<ref>This &amp; That</ref>' then '<ref>This &amp;amp; That</ref>' I do not see this outside of the ref tags.

comment:2 follow-up: ↓ 3 Changed 6 years ago by arczi

  • Keywords Confirmed added
  • Version set to SVN
  • Component changed from General to Project : MediaWiki+FCKeditor

You're right. Current SVN parser changes

[[www.aboutonet.pl?a=b&c=d&e=f]] 

[http://www.onet.pl?a=b&c=d desc&desc]

to

[[Www.aboutonet.pl?a=b&c=d&e=f|Www.aboutonet.pl?a=b&amp;c=d&amp;e=f]] 

[http://www.onet.pl?a=b&c=d desc&amp;desc]

but links still work.

comment:3 in reply to: ↑ 2 Changed 6 years ago by screwtape

The first time the parser transforms the text, the link will work, but after that things get dicey.

Replying to arczi:

You're right. Current SVN parser changes

[[www.aboutonet.pl?a=b&c=d&e=f]] 

[http://www.onet.pl?a=b&c=d desc&desc]

to

[[Www.aboutonet.pl?a=b&c=d&e=f|Www.aboutonet.pl?a=b&amp;c=d&amp;e=f]] 

[http://www.onet.pl?a=b&c=d desc&amp;desc]

but links still work.

comment:4 Changed 5 years ago by cneubauer

You can fix this by changing this line: http://dev.fckeditor.net/browser/MediaWiki/trunk/plugins/mediawiki/fckplugin.js#L637. You need to change:

stringBuilder.push( htmlNode.innerHTML ) ;

to:

stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') ) ;

This probably causes other problems with wikitext in ref tags but since most of the refs we deal with are just links, it works for us.

comment:5 Changed 2 years ago by j.swiderski

  • Status changed from confirmed to closed
  • Resolution set to invalid

Since FCKeditor is no longer supported and was replaced with CKEditor, active development of the MediaWiki extension and support for it are also finished.

I’m closing this ticket as it is no longer valid.

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