From 715fad4883bbaa9981fa23f5af3bb7de048adec6 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 17 May 2021 11:38:35 +0200 Subject: [PATCH] Merge pull request #4046 from overleaf/jpa-fix-404s [misc] use ng-href for dynamic link targets GitOrigin-RevId: 22cccf7a3784cde046d73d88c5929036e3572279 --- services/web/app/views/project/editor/pdf.pug | 2 +- services/web/app/views/project/list/notifications.pug | 4 ++-- services/web/app/views/project/token/access.pug | 2 +- services/web/app/views/user/settings/user-oauth.pug | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/web/app/views/project/editor/pdf.pug b/services/web/app/views/project/editor/pdf.pug index e77c430a24..b4fbb4e42a 100644 --- a/services/web/app/views/project/editor/pdf.pug +++ b/services/web/app/views/project/editor/pdf.pug @@ -255,7 +255,7 @@ div.full-size.pdf(ng-controller="PdfController") ul.dropdown-menu.dropdown-menu-right li(ng-repeat="file in pdf.outputFiles") a( - href="{{file.url}}" + ng-href="{{file.url}}" target="_blank" ) {{ file.name }} a.btn.btn-info.btn-sm(href, ng-click="toggleRawLog()") diff --git a/services/web/app/views/project/list/notifications.pug b/services/web/app/views/project/list/notifications.pug index 86733fbbab..cda1a1cbbc 100644 --- a/services/web/app/views/project/list/notifications.pug +++ b/services/web/app/views/project/list/notifications.pug @@ -62,7 +62,7 @@ include ../../_mixins/reconfirm_affiliation ) #{translate("find_out_more_nt")} .notification-action a.pull-right.btn.btn-sm.btn-info( - href=`{{samlInitPath}}?university_id={{notification.messageOpts.institutionId}}&auto=/project` + ng-href=`{{samlInitPath}}?university_id={{notification.messageOpts.institutionId}}&auto=/project` ) | #{translate("link_account")} .notification-close @@ -138,7 +138,7 @@ include ../../_mixins/reconfirm_affiliation p !{translate("can_link_institution_email_acct_to_institution_acct", {appName: settings.appName, email: "{{notification.email}}", institutionName: "{{notification.institutionName}}"})} div !{translate("doing_this_allow_log_in_through_institution", {appName: settings.appName})} .notification-action - a.btn.btn-sm.btn-info(href="{{samlInitPath}}?university_id={{notification.institutionId}}&auto=/project&email={{notification.email}}") + a.btn.btn-sm.btn-info(ng-href="{{samlInitPath}}?university_id={{notification.institutionId}}&auto=/project&email={{notification.email}}") | #{translate('link_account')} .alert.alert-info( diff --git a/services/web/app/views/project/token/access.pug b/services/web/app/views/project/token/access.pug index fe7f71a5f1..b17dc84bb3 100644 --- a/services/web/app/views/project/token/access.pug +++ b/services/web/app/views/project/token/access.pug @@ -87,7 +87,7 @@ block content | after you have made a copy, please contact support. .row-spaced.text-center - a.btn.btn-primary(href="{{ buildZipDownloadPath(v1ImportData.projectId) }}") + a.btn.btn-primary(ng-href="{{ buildZipDownloadPath(v1ImportData.projectId) }}") | Download project zip file diff --git a/services/web/app/views/user/settings/user-oauth.pug b/services/web/app/views/user/settings/user-oauth.pug index 65144b850c..e384e16c38 100644 --- a/services/web/app/views/user/settings/user-oauth.pug +++ b/services/web/app/views/user/settings/user-oauth.pug @@ -16,7 +16,7 @@ mixin providerList() span(ng-if="providers[key].ui.isProcessing") #{translate("processing")} //- Link a.btn.btn-primary.text-capitalize( - href="{{provider.linkPath}}?intent=link" + ng-href="{{provider.linkPath}}?intent=link" ng-if="!thirdPartyIds[key] && !provider.hideWhenNotLinked" ) #{translate("link")} //- unlink error