diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs index e788c612cf..e2e826445f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs @@ -16,6 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.TuiEditor { public override void ConfigureBundle(BundleConfigurationContext context) { + context.Files.AddIfNotContains("/libs/tui-editor/tui-editor-jquery-patch.js"); context.Files.AddIfNotContains("/libs/to-mark/to-mark.min.js"); if (context.FileProvider.GetFileInfo("/libs/tui-code-snippet/tui-code-snippet.min.js").Exists) diff --git a/npm/packs/tui-editor/abp.resourcemapping.js b/npm/packs/tui-editor/abp.resourcemapping.js index 53a3e493f7..a1d944d7f1 100644 --- a/npm/packs/tui-editor/abp.resourcemapping.js +++ b/npm/packs/tui-editor/abp.resourcemapping.js @@ -3,6 +3,7 @@ "@node_modules/to-mark/dist/to-mark.min.js": "@libs/to-mark/", "@node_modules/tui-code-snippet/dist/*.*": "@libs/tui-code-snippet/", "@node_modules/squire-rte/build/squire.js": "@libs/squire-rte/", - "@node_modules/tui-editor/dist/*.*": "@libs/tui-editor/" + "@node_modules/tui-editor/dist/*.*": "@libs/tui-editor/", + "@node_modules/@abp/tui-editor/src/*.*": "@libs/tui-editor/" } } \ No newline at end of file diff --git a/npm/packs/tui-editor/src/tui-editor-jquery-patch.js b/npm/packs/tui-editor/src/tui-editor-jquery-patch.js new file mode 100644 index 0000000000..1033d18992 --- /dev/null +++ b/npm/packs/tui-editor/src/tui-editor-jquery-patch.js @@ -0,0 +1,7 @@ +/* + https://jquery.com/upgrade-guide/3.5/#jquery-htmlprefilter-changes +*/ +var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi; +jQuery.htmlPrefilter = function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); +};