From 8ecfc978f3313c1ff77033e5e9bf8a6184d6f6b7 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 21 Nov 2018 16:43:44 +0100 Subject: [PATCH] wait #2354 @1 --- js/libs/fluidbook/fluidbook.menu.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index 10200c8b..a0ec7df3 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -451,8 +451,15 @@ FluidbookMenu.prototype = { } }, openText: function (text, callback) { + var styleMatches = text.match(/\([^\<]*)<\/style>/); + var style = ''; + + if (styleMatches !== undefined && styleMatches !== null && styleMatches.length > 1) { + style = styleMatches[1].replace(/\s/g, ''); + } + text = text.replace(/\([^\<]*)<\/style>/g, ''); var t = '
' + this.closeButton() + '

'; - t += '
' + text + '
'; + t += '
' + text + '
'; $("#view").append('
' + t + '
'); if (callback != undefined) { callback(); -- 2.39.5