discourse/discourse — pull request #2277 by vikhyat (2014-04-18 05:01:00+00:00)
Title: Fix HTML tags in topic titles

We no longer sanitize titles before saving to the database since it would cause problems like HTML entities showing up when you try to edit a topic title. It was never really necessary since we only render `fancy_title` directly and never `title`. (`title` is rendered in the SEO-friendly views, but Rails takes care of the escaping in those cases.)

The escaping logic used here is the same that is used both in lodash and onebox. See:

1. https://github.com/discourse/onebox/pull/190/files
2. https://github.com/lodash/lodash/blob/2.4.1/dist/lodash.compat.js#L6194