Skip to content

Issue #1944 reappeared in GLPI 9.5.10/9.5.11 #13202

Closed
@nsalguero

Description

@nsalguero

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

9.5.11

Bug description

Hi,

In GLPI 9.5.10/9.5.11, the issue #1944 reappeared because TinyMCE version 5.10.6 seems to have replaced the event SaveContent by PostProcess.

To solve the problem, here is my patch:

--- glpi/inc/html.class.php.orig        2022-11-04 11:44:35.798454357 +0100
+++ glpi/inc/html.class.php     2022-11-04 11:35:17.132208052 +0100
@@ -3972,6 +3972,9 @@ JS;
                      });
                   }

+                  editor.on('PostProcess', function (contentEvent) {
+                     contentEvent.content = contentEvent.content.replace(/\\r?\\n/g, '');
+                  });
                   editor.on('SaveContent', function (contentEvent) {
                      contentEvent.content = contentEvent.content.replace(/\\r?\\n/g, '');
                   });

I cannot check if that problem also occurs with GLPI 10.0.4/10.0.5 or not.

Best regards,

Nicolas Salguero.

Relevant log output

No response

Page URL

No response

Steps To reproduce

Enter some text containing line feed in a followup, for example and save it.

Your GLPI setup information

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions