Thread:Extension talk:WYSIWYG/Formatting in image captions causes parsererror/reply

CKeditorLinker.php contains only some of front-end functions for wkitext-wysiwyg conversion. CkeditorParser.body.php has additional wysiwyg specific functions for this (=f.ex isolate elements which may not be touched by html conversion). Final wikitext=>html conversion is done by MW function by calling parent::internalParse.

I have not been able to figure out where restore of isolated elements of wysiwyg mode takes place and what triggers it.

I would assume that this issue should be fixed so that part where you have html code, should be isolated first in "CKeditorParser.body.php=>internalParse" (=replaced by "fixed string" + counter) so that MW wikitext=>html conversion does not touch it. After html conversion of MW is ready, original content of that part should be restored back.

Perhaps you could find out some ideas if you try to spy how modification dated "27.12.14" version "1.5.6_0 [B551+27.12.2014]" was fixed, because that was dealing with isolate/restore with links.