Opened 16 years ago

Closed 12 years ago

#2544 closed Bug (invalid)

& 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 (5)

comment:1 Changed 16 years ago by Greg Miller

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 Changed 16 years ago by Artur Formella

Component: GeneralProject : MediaWiki+FCKeditor
Keywords: Confirmed added
Version: SVN

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 15 years ago by Greg Miller

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 15 years ago by Christian

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 12 years ago by Jakub Ś

Resolution: invalid
Status: confirmedclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy