Sometimes GeSHi produces invalid xhtml. See
http://www.dokuwiki.org/tips:backup_script as an example. There you will find the following erroneous code -> "</span</pre>".
Looks like this bug:
http://sourceforge.net/tracker/index.php?func=detail&aid=1996353&group_id=114997&atid=670231