Updated Log script

More robust log display, with CSS and a better way of handling special characters.
Also possibly slightly more resource-efficient, but I don't know if that makes much of a difference.