[Bug 26942] New: TinyMCE in the News Tool is still doing some types of automatic code cleanup
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Bug ID: 26942 Summary: TinyMCE in the News Tool is still doing some types of automatic code cleanup Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: -Make sure the sys pref 'NewsToolEditor' is set to TinyMCE -Go to any news item and add this line: <link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet"> -Save the news item -Re-open the same news item again in TinyMCE. -The editor has removed that line. Annoying! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- TinyMCE doesn't automatically takes out HTML tags like <link>, <style>, and <meta> because those are not valid HTML tags inside the HTML body. They belong in the HTML <head>. Perhaps we need a new system preference that would allow librarians to insert things into the HTML <head>. We should be able to easily add this to doc-head-open.inc -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass from comment #1)
TinyMCE doesn't automatically takes out HTML tags like <link>, <style>, and <meta> because those are not valid HTML tags inside the HTML body. They belong in the HTML <head>.
That should say "TinyMCE automatically takes out HTML tags like...", right? That is annoying... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to David Cook from comment #2)
(In reply to Lucas Gass from comment #1)
TinyMCE doesn't automatically takes out HTML tags like <link>, <style>, and <meta> because those are not valid HTML tags inside the HTML body. They belong in the HTML <head>.
That should say "TinyMCE automatically takes out HTML tags like...", right?
That is annoying...
David, correct. I meant it DOES automatically take out HTML tags like... Thanks for clarifying. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass from comment #3)
David, correct. I meant it DOES automatically take out HTML tags like...
Thanks for clarifying.
Just to clarify again. I was saying that the TinyMCE behaviour was annoying and not the typo heh. If you do a patch for this one, I'd be happy to test it. (Probably not something I'll look at writing my own fix for any time soon thought.) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 115715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115715&action=edit Bug 26942: Allow style and link tags in NewsEditor TinyMCE To Test: -Make sure the sys pref 'NewsToolEditor' is set to TinyMCE -Go to any news item and add this line: <link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet"> -Save the news item -Re-open the same news item again in TinyMCE. -The editor has removed that line. Annoying! -Apply patch -Try again, the <link> should stay now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Just used this in a hot fix. So handy. I'll run up a KTD and sign this off pronto... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Michael Sutherland <sudrland@vt.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sudrland@vt.edu --- Comment #7 from Michael Sutherland <sudrland@vt.edu> --- This is plainly awful. As a web developer, I do not want some WYSIWYG editor telling me I do not know how to write HTML and start taking out HTML I put in for a reason, such as a <div> or <script> and then have everything break because the system does not like my HTML. It's not incorrect to have certain tags in the body and we've done it that way precisely because we do not have access to add code in the <head>. I understand some of us are a little more savvy and technically able to write HTML than others and this is attempting to make something work for everyone, because clearly, not everyone knows how to write HTML. However, this development is not at all 'handy'. And, I do not particularly like that everything was moved out of system preferences into the news section. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #8 from Michael Sutherland <sudrland@vt.edu> --- If this is meant to fix those issues with the WYSIWYG editing code then it should be a higher priority. What I intended to say is that the WYSIWYG making coding changes is not helpful, especially when it does not have a way to log and recover lost code due to those changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- It looks like we could optionally disable validation in TinyMCE: https://stackoverflow.com/questions/7058623/tinymce-completely-disable-valid... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Kyle M Hall from comment #9)
It looks like we could optionally disable validation in TinyMCE: https://stackoverflow.com/questions/7058623/tinymce-completely-disable- validation
verify_html: false is already set when initializing TinyMCE. Maybe we should add these other lines to the config: cleanup_on_startup: false, trim_span_elements: false, cleanup: false, convert_urls: false -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115715|0 |1 is obsolete| | CC| |amitddng135@gmail.com --- Comment #11 from Amit Gupta <amitddng135@gmail.com> --- Created attachment 118885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118885&action=edit Bug 26942: Allow style and link tags in NewsEditor TinyMCE To Test: -Make sure the sys pref 'NewsToolEditor' is set to TinyMCE -Go to any news item and add this line: <link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet"> -Save the news item -Re-open the same news item again in TinyMCE. -The editor has removed that line. Annoying! -Apply patch -Try again, the <link> should stay now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Lucas Gass from comment #10)
(In reply to Kyle M Hall from comment #9)
It looks like we could optionally disable validation in TinyMCE: https://stackoverflow.com/questions/7058623/tinymce-completely-disable- validation
verify_html: false is already set when initializing TinyMCE. Maybe we should add these other lines to the config:
cleanup_on_startup: false, trim_span_elements: false, cleanup: false, convert_urls: false
I'd like to see this investigated. Now that both editors can be used alongside, it's very bad when one changes what was written with the other. At least this is unexpected behaviour. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118885|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 118902 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118902&action=edit Bug 26942: Allow style and link tags in NewsEditor TinyMCE To Test: -Make sure the sys pref 'NewsToolEditor' is set to TinyMCE -Go to any news item and add this line: <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> -Save the news item -Re-open the same news item again in TinyMCE. -The editor has removed that line. Annoying! -Apply patch -Try again, the <link> should stay now Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- Apologies for not doing more last week. I got caught up with other things, but glad to see it sparked more action! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Michael Sutherland from comment #7)
This is plainly awful. As a web developer, I do not want some WYSIWYG editor telling me I do not know how to write HTML and start taking out HTML I put in for a reason, such as a <div> or <script> and then have everything break because the system does not like my HTML. It's not incorrect to have certain tags in the body and we've done it that way precisely because we do not have access to add code in the <head>. I understand some of us are a little more savvy and technically able to write HTML than others and this is attempting to make something work for everyone, because clearly, not everyone knows how to write HTML. However, this development is not at all 'handy'. And, I do not particularly like that everything was moved out of system preferences into the news section.
I think Michael brings up a good point here. There is no way to insert scripts, links to Google fonts, meta tags into the HTML head and many bypassed this by adding those things to the OPACHeader. I have filed bug 28080 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|21.05.00 |21.05.00,20.11.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #18 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I'm still loosing my link on 20.05 with this patch. Can you please take a look, Lucas? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable --- Comment #19 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Talked to Lucas, I'd misunderstood the test plan. Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #20 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26942 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34463 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org