diaspora/diaspora — pull request #4836 by MrZYX (2014-03-09 02:32:24+00:00)
Title: [WIP] Introdcue message renderer

This new class replaces all existing server side message
rendering helpers and is the new global entry point for such
needs. All models with relevant fields now expose an instance
of MessageRenderer for those. MessageRenderer acts as
gateway between the existing processing solutions for markdown,
mentions and tags and provides a very flexible interface for
all output needs. This makes the API to obtain a message
in a certain format clear. As a result of centralizing the
processing a lot of duplication is eliminated. Centralizing
the message processing also makes it clear where to change
its behaviour, add new representations and what options
are already available.

Todo:

* [ ] (Re)add a ton of specs
* [ ] Verify there are no XSS issues
Review by somebody else would be much appreciated.
Places to check
* Profile bio
* Profile location
* Mobile posts
* Mobile comments
* HTML emails
* [ ] Verify there are no major behavior breakages not covered by tests
* [ ] Verify mentioning still works as expected
* Are mentions stripped where they should be stripped?
* Are non hovercard links used in emails?
* Are non hovercard links used in the atom feed?
* Are non hovercard links used for people not in the posts target aspects?
* Are hovercard links used for public posts?
* Are hovercard links used for people in the posts target aspects?
* [ ] Verify service posting still works as expected
* No Markdown or HTML on Twitter
* No Markdown or HTML on Facebook
* Markdown posted to Tumblr (what about mentions?)
* HTML posted to Wordpress (no hovercard links for mentions)
* [ ] Verify title extraction still works as expected

I don't think all of these checks needs to be done in this PR, most issues should be easy to fix with follow up PRs, after all that's the main reason for this new piece of infrastructure.

This should close #4683.