oops: Ensure cid does not corrupt the regex
oops: Fix pass string by reference error
oops: Fix incorrect <div> for thread attachments
Merge pull request #883 from greezybacon/issue/oops-i-did-it-again

oops: Fix a few small issues

Reviewed-By: Peter Rotich <peter@osticket.com>