Ok. I've got a basic script. It's not perfect. It looks at all html files and replaces all lines that match the matchstring with nothing. It creates backup files with a .bak extension whether a file is altered or not.
Code:
find . -name "*.html" -exec sed -e '/^matchstring*/d' -i.bak {} \;
So, replace matchstring with the malicious line you want removed.
BACKUP ALL FILES FIRST!! just in case something goes wrong.
Edit: And if you want to check other files, just change the *.html to *.whatever, or just use * alone to search all files.