From 17f80b71a3e960fc595f76b3b17e6146df9adfb5 Mon Sep 17 00:00:00 2001 From: Vit Brunner Date: Sun, 21 Sep 2014 13:11:48 +0200 Subject: [PATCH] Fix html oversanitization --- source/documents/_scripts.html.jade | 1 + source/documents/index.html.jade | 6 +++--- source/documents/scripts/app.js.coffee | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/documents/_scripts.html.jade b/source/documents/_scripts.html.jade index 1ba47a5..ae254f2 100644 --- a/source/documents/_scripts.html.jade +++ b/source/documents/_scripts.html.jade @@ -1,6 +1,7 @@ // application scripts script(src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js") script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.js") +script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular-sanitize.js") script(src="//cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.js") script(src="scripts/app.js") script(src="scripts/services/fetch.js") diff --git a/source/documents/index.html.jade b/source/documents/index.html.jade index 8db1b94..a39c22d 100644 --- a/source/documents/index.html.jade +++ b/source/documents/index.html.jade @@ -30,7 +30,7 @@ html(ng-app="sideBySide") .version(ng-repeat="heading in headings") .version-padded .version-menu - .text {{ heading }} + .text(ng-bind-html="heading") // verses #content @@ -38,5 +38,5 @@ html(ng-app="sideBySide") .version(ng-repeat="version in verse") .version-padded .version-container - .section(ng-hide="version.section == ''") {{ version.section }} - .text(ng-bind-html-unsafe="version.text") + .section(ng-hide="version.section == ''" ng-bind-html="version.section") + .text(ng-bind-html="version.text") diff --git a/source/documents/scripts/app.js.coffee b/source/documents/scripts/app.js.coffee index f287e3f..14043d1 100644 --- a/source/documents/scripts/app.js.coffee +++ b/source/documents/scripts/app.js.coffee @@ -1 +1 @@ -angular.module 'sideBySide', ['sideBySide.controllers'] +angular.module('sideBySide', ['sideBySide.controllers', 'ngSanitize'])