Merge pull request #1473 from sharelatex/as-fix-notification-translation

Inject data into translation string to workaround removed potential XSS

GitOrigin-RevId: 6d9fa7050dafa1d48e3622765586eb4350dc514b
This commit is contained in:
Chrystal Maria Griffiths 2019-02-04 11:14:44 +00:00 committed by sharelatex
parent f5a6992aaa
commit 91594eee6d

View file

@ -12,7 +12,7 @@ span(ng-controller="NotificationsController").userNotifications
.alert.alert-info(ng-switch-when="notification_project_invite", ng-controller="ProjectInviteNotificationController") .alert.alert-info(ng-switch-when="notification_project_invite", ng-controller="ProjectInviteNotificationController")
div.notification_inner div.notification_inner
.notification_body(ng-show="!notification.accepted") .notification_body(ng-show="!notification.accepted")
| !{translate("notification_project_invite_message")} | !{translate("notification_project_invite_message", { userName: "{{ userName }}" })}
a.pull-right.btn.btn-sm.btn-info(href, ng-click="accept()", ng-disabled="notification.inflight") a.pull-right.btn.btn-sm.btn-info(href, ng-click="accept()", ng-disabled="notification.inflight")
span(ng-show="!notification.inflight") #{translate("join_project")} span(ng-show="!notification.inflight") #{translate("join_project")}
span(ng-show="notification.inflight") span(ng-show="notification.inflight")
@ -20,7 +20,7 @@ span(ng-controller="NotificationsController").userNotifications
|   |  
| #{translate("joining")}... | #{translate("joining")}...
.notification_body(ng-show="notification.accepted") .notification_body(ng-show="notification.accepted")
| !{translate("notification_project_invite_accepted_message")} | !{translate("notification_project_invite_accepted_message", { projectName: "{{ projectName }}" })}
a.pull-right.btn.btn-sm.btn-info(href="/project/{{ notification.messageOpts.projectId }}") #{translate("open_project")} a.pull-right.btn.btn-sm.btn-info(href="/project/{{ notification.messageOpts.projectId }}") #{translate("open_project")}
span().notification_close span().notification_close
button(ng-click="dismiss(notification)").close.pull-right button(ng-click="dismiss(notification)").close.pull-right