You should find this at line 378 in that file...
$input = preg_replace('`(#[^"<]*)`e', 'str_replace("~", "-", "$1")', $input);
You can replace with, for instance:
$input = preg_replace_callback('~#[^"<]*~', function ($match) { return strtr($match[0], '~', '-'); }, $input);
This is taken straight from Wedge (wedge.org, which has Aeva Media 2.x directly embedded in it), and should only work on PHP 5.3+, but 99% of servers have it by now.
I'm surprised I didn't backport this into v1.4 and v2.0, though. Not that anyone complained...