Author: a.badger
Description:
We had a user cut and paste a template from our mediawiki installation end up with some strange non-space invisible characters today. We think the cut and paste is a bit obscure. (He's using vimperator on firefox and that seems to have been part of how this happens). However, looking at what caused the special characters we found that mediawiki is adding if it's preceded with certain special characters. This happens even if the text occurs in a <pre> tag which seem redundant in most cases and, in this case, leads to the cut and paste bug we observed.
The following code seems to be causing this:
from Parser::parse():
Clean up special characters, only run once, next-to-last before doBlockLevels
$fixtags = array(
- french spaces, last one Guillemet-left
- only if there is something before the space '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => '\\1 \\2',
- french spaces, Guillemet-right '/(\\302\\253) /' => '\\1 ', '/ (!\s*important)/' => ' \\1', #Beware of CSS magic word
!important, bug #11874.
);
It would be great if this code was smart enough to not replace spaces with inside of a <pre>.
Version: unspecified
Severity: enhancement