please use an existing rails helper here, namely content_tag, see http://apidock.com/rails/ActionView/Helpers/TagHelper/content_tag