[PR] Improve spine_options handling in header template

* Parses data from the database against a set of default options before attempting to use.
* Escapes the class names on output