ivaynberg/select2 — pull request #2415 by santialbo (2014-05-28 17:21:36+00:00)
Title: Add text function for formatResult and formatSelection

As mentioned in #2389, the default implementations of `formatResult` and `formatSelection` don't use the `data.text` property to get the text.
This pull requests makes the default implementations check for such property and use it if it exists.

This is my first pull request to this project and I didn't see any contribution guidelines so feel free to point any issues.

Thanks