diff --git a/Changelog.md b/Changelog.md index 7b51968f1..a13c9434e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ * Make invite code input width consistent across borwsers [#4448](https://github.com/diaspora/diaspora/pull/4448) * Fix style of contacts in profile sidebar [#4451](https://github.com/diaspora/pull/4451) * Fix profile mobile when logged out [#4464](https://github.com/diaspora/pull/4464) +* Fix preview with more than one mention [#4450](https://github.com/diaspora/diaspora/issues/4450) ## Features * Add oEmbed content to the mobile view [#4343](https://github.com/diaspora/diaspora/pull/4353) diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index c99584919..2e7488bc1 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -160,7 +160,7 @@ app.views.Publisher = Backbone.View.extend(_.extend( }); var mentioned_people = new Array(); - var regexp = new RegExp("@{\(\.\*\) ; \(\.\*\)}", "g"); + var regexp = new RegExp("@{\(\[\^\;\]\+\); \(\[\^\}\]\+\)}", "g"); while(user=regexp.exec(serializedForm["status_message[text]"])){ // user[1]: name, user[2]: handle var mentioned_user = Mentions.contacts.filter(function(item) { return item.handle == user[2];})[0];