Tidy up "functions.inc"

Escape single quotes for TABLE and HREF
Updated closing TR tag
Merge pull request #1055 from ExolonDX/branch_master_10