Fix the subject line parsing for database email templates