mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-17 11:22:46 +08:00
webconfig: Replace unsafe binding with filter
ng-bind-html-unsafe was apparently removed.
This commit is contained in:
parent
9cfcdfa105
commit
3f904b6a59
|
@ -1,5 +1,12 @@
|
|||
fishconfig = angular.module("fishconfig", ["filters", "controllers", "ngRoute", "ngSanitize"]);
|
||||
|
||||
angular.module('fishconfig')
|
||||
.filter('to_trusted', ['$sce', function($sce){
|
||||
return function(text) {
|
||||
return $sce.trustAsHtml(text);
|
||||
};
|
||||
}]);
|
||||
|
||||
fishconfig.config(
|
||||
["$routeProvider", function($routeProvider) {
|
||||
$routeProvider
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- The first 'sample' prompt is the current one; the remainders are samples. This ought to be cleaned up. -->
|
||||
<div class="current_prompt" style="min-height: 7.5em">
|
||||
<div class="prompt_demo_choice_label">{{ selectedPrompt.name }}</div>
|
||||
<div ng-bind-html-unsafe='selectedPrompt.demo' class="prompt_demo unbordered"></div>
|
||||
<div ng-bind-html='selectedPrompt.demo | to_trusted' class="prompt_demo unbordered"></div>
|
||||
<div style="position: absolute; right: 5px; bottom: 5px; color:">
|
||||
<span class="save_button"
|
||||
ng-show="showSaveButton"
|
||||
|
@ -14,7 +14,7 @@
|
|||
<div class="prompt_choices_list">
|
||||
<div ng-repeat="prompt in samplePrompts">
|
||||
<div class="prompt_demo_choice_label">{{ prompt.name }}</div>
|
||||
<div ng-bind-html-unsafe='prompt.demo' class="prompt_demo" ng-click="selectPrompt(prompt)"></div>
|
||||
<div ng-bind-html='prompt.demo | to_trusted' class="prompt_demo" ng-click="selectPrompt(prompt)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user