mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add a trusted filter for iframe downloads (#836)
* add trusted helper to iframe downloads
This commit is contained in:
parent
eeadd1e9bb
commit
ab1848d0ae
2 changed files with 5 additions and 1 deletions
|
@ -305,7 +305,7 @@ div.full-size.pdf(ng-controller="PdfController")
|
|||
dbl-click-callback="syncToCode"
|
||||
)
|
||||
iframe(
|
||||
ng-src="{{ pdf.url }}"
|
||||
ng-src="{{ pdf.url | trusted }}"
|
||||
ng-if="settings.pdfViewer == 'native'"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,6 +12,10 @@ define [
|
|||
# and then again on ack.
|
||||
AUTO_COMPILE_DEBOUNCE = 2000
|
||||
|
||||
App.filter('trusted', ['$sce', ($sce)->
|
||||
return (url)-> return $sce.trustAsResourceUrl(url);
|
||||
])
|
||||
|
||||
App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, logHintsFeedback, localStorage) ->
|
||||
# enable per-user containers by default
|
||||
perUserCompile = true
|
||||
|
|
Loading…
Reference in a new issue