Show only ≤16 lines of code in a discussion (fix issue #2860).
Since search_autocomplete_source rendered with raw all human input should be sanitized to prevent XSS
Sanitize user profile input
proper name for issue partial
Add close issue to note actions bar
Fixing tests
Fix issue edit button showup
Merge pull request #2889 from kennytm/master

Show only ≤16 lines of codes in a discussion in a MR (issue #2860).
Merge branch 'state-machine-stage-2' of https://github.com/Undev/gitlabhq into Undev-state-machine-stage-2

Conflicts:
	app/models/merge_request.rb
Fix automerge detection client-side since #3056
Merge branch 'Undev-state-machine-stage-2'
email validation added
Add state machine gem
Add base of Event base
Add base of Notifications
Subscription base
Add notofication state to notifications
Replace Event class with OldEvent class
replace events with old_events
Add new relations with new events system