From 2fbe775070637ebdddcc9ea0b455e80dbb85a83d Mon Sep 17 00:00:00 2001 From: Didier Gautheron Date: Wed, 24 Jun 2020 16:03:16 +0200 Subject: [PATCH] Bug 25862: Prevent TinyMCE to mangle local url links To test: 1 create a report 1 if it doesn't exist 2 open /cgi-bin/koha/tools/koha-news.pl 3 create a news 4 add a HTML link with Insert/Edit link tinyMCE dialog box to /cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Run%20this%20report "report 1" 5 save 6 on the main page "report 1" link returns a 404 error Apply patch 7 Modify news' URL 8 Test it works in: tools/koha-new.pl admin/branches.pl and admin/preferences.pl Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 1 + 3 files changed, 3 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 bcfd0f1648..f1e8be331a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc @@ -14,6 +14,7 @@ tinyMCE.init({ branding : false, + relative_urls : false, content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", editor_selector : "mce", menubar : "file edit view insert format tools table", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index bda80a8407..bf140b2960 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -387,6 +387,7 @@ tinyMCE.init({ branding : false, + relative_urls : false, content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", menubar : "file edit view insert format tools table", mode : "specific_textareas", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index 062f0e1642..8059f2c03b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -301,6 +301,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %] force_p_newlines : false, forced_root_block : '', branding : false, + relative_urls : false, content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", menubar : "file edit view insert format tools table", mode : "specific_textareas", -- 2.39.5