Thread:Extension talk:WYSIWYG/Patch for CKeditor.body.php to make it work in MW 1.18/reply (10)

I just realised that the modification seem to happen when the wikisyntax is *loaded* into the page, not when is submitted/saved or loaded into the editor component. I have traced back through the javascript and it seems like the php code at CKeditorParser.body.php overrides the replaceInternalLinks method and always converts internal links. I don't have time to dig further until later, but this is the only place in all the code where something is replaced by RTENOTITLE. It seems that this is a somewhat too indiscriminate conversion to always make.

function replaceInternalLinks($text) { $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "RTENOTITLE", $text); // #2223: 	=>	RTENOTITLE $text = preg_replace("/\[\[:(.*?)\]\]/", "RTECOLON$1", $text); // change ':' => 'RTECOLON' in links $text = parent::replaceInternalLinks($text); $text = preg_replace("/\|RTENOTITLE\]\]/", "]]", $text); // remove unused RTENOTITLE return $text; }