From 063dc1429058f7c3ae7dc132821989b69a817ff5 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Sun, 10 Jan 2021 13:23:39 +0330 Subject: [PATCH] fix: disable sanitizer for amp custom style --- templates/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/plugin.js b/templates/plugin.js index 653475c6..07c78ba4 100644 --- a/templates/plugin.js +++ b/templates/plugin.js @@ -16,7 +16,7 @@ export default async function (ctx, inject) { const { head } = ctx.app // Disable sanitizer head.__dangerouslyDisableSanitizersByTagID = head.__dangerouslyDisableSanitizersByTagID || {} - head.__dangerouslyDisableSanitizersByTagID['amp-custom'] = ['innerHTML'] + head.__dangerouslyDisableSanitizersByTagID['amp-custom'] = ['cssText'] const cssText = await import('!!raw-loader<%= options.cssLoader %>!<%= options.css %>').then(m => m.default || m) head.style.push({ cssText, type: 'text/css', hid: 'amp-custom' })