Bug 28525: Dont let TinyMCE do code cleanup
authorLucas Gass <lucas@bywatersolutions.com>
Mon, 7 Jun 2021 22:17:46 +0000 (22:17 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 27 Aug 2021 19:09:22 +0000 (09:09 -1000)
commit91d0efcf8a75d5a7ebda0ea3a89ab77c6a93d632
tree4f59c4733ddc514dbf9f6f0f671daa74825a8dd1
parent52e7b416ce011fb3df9b2433dccb70687b8f7063
Bug 28525: Dont let TinyMCE do code cleanup

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 '<i class="fa fa-facebook-official" aria-hidden="true">TEST</i>' in the Source Code window
4. It gets cleaned up by the editor
5. Try something like '<a href="https://www.test.com" referrerpolicy="&quot;no-referrer-when-downgrade">TEST</a>'
6. It's cleaned up by the editor.
7. Try something like '<link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet">'
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 <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 995d080e39230305dc6d3336db8ca2ab6308e829)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc