diff --git a/openslides/assignments/static/js/assignments/pdf.js b/openslides/assignments/static/js/assignments/pdf.js index c1df67933..26bfb979c 100644 --- a/openslides/assignments/static/js/assignments/pdf.js +++ b/openslides/assignments/static/js/assignments/pdf.js @@ -6,9 +6,10 @@ angular.module('OpenSlidesApp.assignments.pdf', ['OpenSlidesApp.core.pdf']) .factory('AssignmentContentProvider', [ '$filter', + 'HTMLValidizer', 'gettextCatalog', 'PDFLayout', - function($filter, gettextCatalog, PDFLayout) { + function($filter, HTMLValidizer, gettextCatalog, PDFLayout) { var createInstance = function(assignment) { @@ -39,6 +40,7 @@ angular.module('OpenSlidesApp.assignments.pdf', ['OpenSlidesApp.core.pdf']) // description var createDescription = function() { if (assignment.description) { + var html = HTMLValidizer.validize(assignment.description); var descriptionText = gettextCatalog.getString("Description") + ":"; var description = [ { @@ -47,7 +49,7 @@ angular.module('OpenSlidesApp.assignments.pdf', ['OpenSlidesApp.core.pdf']) style: 'textItem' }, { - text: $(assignment.description).text(), + text: $(html).text(), style: 'textItem', margin: [10, 0, 0, 0] } diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index 5ce270beb..bd9823b1a 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -144,9 +144,9 @@ angular.module('OpenSlidesApp.core.pdf', []) return str; } }); - return "
" + str + "
"; + return '' + str + '
'; } else { - return ""; //needed for blank "reasons" field + return ''; //needed for blank "reasons" field } }; return HTMLValidizer;