-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Joomla Text Filtering Setting Being Ignored by TinyMCE #42117
Comments
Turning the text filters off doesn't stop tinymce from preventing invalid html. There is nothing that joomla can do to allow you to paste this html. You can test it yourself on a pure tinymce demo here https://www.tiny.cloud/docs/demo/classic/ where the effect is the same. The slightly good news for you is that tinymce v6 does its job slightly differently and corrects your code in a better way (for you). You can test this at https://www.tiny.cloud/docs/tinymce/6/classic-demo/ Tinymce v6 is in Joomla 5 which is scheduled to be released in a week. |
Thanks for the update. That does look promising. Is there no way to tell TinyMCE to not do any code filtering for Super Users AT ALL that anybody is aware of? That seems like a fairly straightforward thing to have as a feature as it essentially just means "do absolutely nothing" to the code. I'm not sure I understand at all what the purpose of having an "extended allowed" field is, which their documentation states can accept wildcards, if this is then just completely ignored. Similarly, what is the purpose of the switch "Use Joomla Filter" if again this setting appears to not be respected, and it just does its own thing without as much as a warning that code has been removed. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42117. |
No. |
Closing this issue because this is handled by TinyMCE and Joomla could not do anything change this behavior as pointed out by @brianteeman |
Steps to reproduce the issue
OR
THEN
Open a new Joomla Article, switch to TinyMCE code view and paste in some custom html with custom element attributes such as this sample code:
Expected result
Page is saved correctly and code remains unchanged since I have disabled Joomla Filtering in Global Settings for the Super Users group which I am part of, and since I am using either the Joomla Filtering mode (None) option in TinyMCE, or attempting to use its own settings by overriding the TinyMCE native filters and allowing all elements by using the wildcard *[*] in order to prevent it from filtering any potentially disallowed elements or attributes.
Actual result
On save of the article, or by toggling between code view and WYSIWYG mode, then back to code view, the resulting code is heavily stripped back as shown below, and the html no longer functions or renders as intended.
System information (as much as possible)
PHP Built On Linux 5.15.0-86-generic #96-Ubuntu SMP Wed Sep 20 08:23:49 UTC 2023 x86_64
Database Type mysql
Database Version 10.6.12-MariaDB-0ubuntu0.22.04.1
Database Collation utf8mb3_general_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption No
PHP Version 8.2.11
Web Server Apache
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 4.3.4 Stable [ Bora ] 22-August-2023 16:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Additional comments
A previous post (Issue #35535) has a very similar problem description and I looked at this in detail, but the solution there was that the changes were simply being applied to the wrong "TinyMCE Set", which is definitely not where I have been going wrong and I double and triple check this.
The text was updated successfully, but these errors were encountered: