Allow \x1b (ascii ESC) in wfDebug() output
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 9 Nov 2011 10:24:54 +0000 (10:24 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 9 Nov 2011 10:24:54 +0000 (10:24 +0000)
commitd3c0084895b682dab53040d4eb29303754bc49d1
tree4e908859f949dbf5d65171b76eefae2a17a17811
parentba0bf4a95f930729e235463636c43fa38b7d2929
Allow \x1b (ascii ESC) in wfDebug() output

It is a local hack I had to let me pass colored debug message using a local
wrapper:

function wfDebugGreen($msg) {
$color = "\x1b[1;32m"; # Green
$reset = "\x1b[1;0m";
wfDebug( $color . $msg . $reset );
}

Ideally \x1b should only be kept if it is followed by /(\d+(;\d)?)?+m/
which should match the 'graphic rendering' ANSI escape code.
includes/GlobalFunctions.php