Thread:Extension talk:WYSIWYG/Media: links get mangled (fully patched 1.19)/reply (8)

I had the same issue as Derekcat. Turns out some of my pages were using the Media tag with a lower case m. I added the following lines and now it seems to be working:

$text = preg_replace("/(\[\[)(Media:.*?\]\])/", '$1:$2', $text); $text = preg_replace("/(\[\[)(media:.*?\]\])/", '$1:$2', $text); $parserOutput->setText(preg_replace('/(a href="):(Media.*?")/', '$1$2', $parserOutput->getText)); $parserOutput->setText(preg_replace('/(a href="):(media.*?")/', '$1$2', $parserOutput->getText));