update Story class

added escapeString to text inputs and formated the sql