Details
Description
I've been hours trying to find out why, under certain circumstances, a link like "/file.php/263/onefile.htm" would return a blank page while "/file.php/263/otherfile.htm" does not. Tracing took me through file.php->filelib.php (send_file function) -> filter_text function and finally to mediaplugin_filter function, where I found that preg_replace() was the one returning a blank $text.
The problem arose when upgraded the server to PHP5, so I suspect preg_replace() is returning an empty $text when the original $text is not well-formed UTF-8. This is very probable, since the files in moodledata not necessarily are in UTF-8 (this particular installation was a 1.4, then 1.5, and now 1.7.2).