diff --git a/static/js/services/string-builder-service.js b/static/js/services/string-builder-service.js index f59598f72..d5ec9130e 100644 --- a/static/js/services/string-builder-service.js +++ b/static/js/services/string-builder-service.js @@ -26,6 +26,10 @@ angular.module('quay').factory('StringBuilderService', ['$sce', 'UtilService', f 'manifest_digest': 'link' }; + var allowMarkdown = { + 'description': true, + }; + var filters = { 'obj': function(value) { if (!value) { return []; } @@ -118,8 +122,12 @@ angular.module('quay').factory('StringBuilderService', ['$sce', 'UtilService', f } var safe = UtilService.textToSafeHtml(value); - var markedDown = UtilService.getMarkedDown(safe); - markedDown = markedDown.substr('
'.length, markedDown.length - '
'.length); + var result = safe; + + if (allowMarkdown[key]) { + result = UtilService.getMarkedDown(result); + result = result.substr(''.length, result.length - '
'.length); + } var icon = fieldIcons[key]; if (icon) { @@ -127,12 +135,12 @@ angular.module('quay').factory('StringBuilderService', ['$sce', 'UtilService', f icon = 'fa-' + icon; } - markedDown = '' + markedDown; + result = '' + result; } var codeTag = opt_codetag || 'code'; description = description.replace('{' + prefix + key + '}', - '<' + codeTag + '>' + markedDown + '' + codeTag + '>'); + '<' + codeTag + '>' + result + '' + codeTag + '>'); return description }