from http://gitorious.org/htmldiff/htmldiff/