diff --git a/lib/ba-linkify/src/ba-linkify.js b/lib/ba-linkify/src/ba-linkify.js index 32fbea3e12..461aff97fb 100644 --- a/lib/ba-linkify/src/ba-linkify.js +++ b/lib/ba-linkify/src/ba-linkify.js @@ -23,6 +23,12 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ + /** + * Note(taoalpha): + * + * To support emails with dots in the name: `foo.bar@test.com`, + * the match regex was modified to match `email` first before urls. + */ /*! * JavaScript Linkify - v0.3 - 6/27/2009 * http://benalman.com/projects/javascript-linkify/ @@ -108,7 +114,7 @@ window.linkify = (function(){ MAILTO = "mailto:", EMAIL = "(?:" + MAILTO + ")?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + HOST_OR_IP + QUERY_FRAG + "(?!\\w)", - URI_RE = new RegExp( "(?:" + URI1 + "|" + URI2 + "|" + EMAIL + ")", "ig" ), + URI_RE = new RegExp( "(?:" + EMAIL + "|" + URI1 + "|" + URI2 + ")", "ig" ), SCHEME_RE = new RegExp( "^" + SCHEME, "i" ), quotes = {