From 91d0efcf8a75d5a7ebda0ea3a89ab77c6a93d632 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 7 Jun 2021 22:17:46 +0000 Subject: [PATCH] Bug 28525: Dont let TinyMCE do code cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If you look at Bug 24764 and Bug 26942 we adjusted the TinyMCE for the News tool so it will not do some types of automatic code clean up. The TinyMCE editor for system preferences which can be enabled by 'UseWYSIWYGinSystemPreferences' has the same problems. We should make the configurations the same. To Test: 1. Turn on 'UseWYSIWYGinSystemPreferences' 2. Go to a system preference like 'RestrictedPageContent' 3. Try entering something like '' in the Source Code window 4. It gets cleaned up by the editor 5. Try something like 'TEST' 6. It's cleaned up by the editor. 7. Try something like '' 8. Cleaned up by editor. 9. Apply patch 10. Try step 3, 5, and 7 again. 11. It should not be changed by the editor Signed-off-by: Barbara Johnson Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 995d080e39230305dc6d3336db8ca2ab6308e829) Signed-off-by: Fridolin Somers --- .../prog/en/includes/wysiwyg-systempreferences.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc index f1e8be331a..c6875c01ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc @@ -13,6 +13,12 @@ } tinyMCE.init({ + verify_html: false, + force_br_newlines : false, + force_p_newlines : false, + forced_root_block : '', + extended_valid_elements:"style,link[href|rel]", + custom_elements:"style,link,~link", branding : false, relative_urls : false, content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", -- 2.39.5