Skip to content
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

fix(textfield) remove invalid '\r\n' tokens #3065

Merged
merged 2 commits into from
Nov 7, 2022

Conversation

cedric-anne
Copy link
Contributor

@cedric-anne cedric-anne commented Nov 4, 2022

Changes description

In GLPI 9.5.10, \r\n tokens are no more removed when richtext is produced by tinymce (see glpi-project/glpi#13202). I think it could be logical to apply same transformation as it is already done for default value:

$this->value = Toolbox::stripslashes_deep(str_replace('\r\n', "\r\n", $input['default_values']));

Checklist

Please check if your PR fulfills the following specifications:

  • Tests for the changes have been added
  • Docs have been added/updated

References

Internal ref: 25456

Closes #N/A

@cedric-anne cedric-anne self-assigned this Nov 4, 2022
@btry
Copy link
Collaborator

btry commented Nov 4, 2022

This PR shoud apply only on GLPI 9.5.10 as the plugin is compatible with older releases; then I think we should use a condition testing GLPI_VERSION instead of just dropping the line.

@btry
Copy link
Collaborator

btry commented Nov 7, 2022

Validated by bug reporter.

@btry btry merged commit da9d8dc into pluginsGLPI:support/2.12.0 Nov 7, 2022
@cedric-anne cedric-anne deleted the 2.12/fix-rn-tokens branch November 7, 2022 08:12
@mauriciolamego
Copy link

mauriciolamego commented Nov 9, 2022

Dear, thank you for the information.
The suggestion worked in part. After registering the new call, with an update in the call, the character reappears. As additional information, the text area field is not able to be filled in when the form is public.

From the suggested changes, we tinkered with the inc/field/textfield.class.php and js/scripts.js files

Could you help us?

New ticket, opened correctly.
image

Updated call to the service team. Scaloned to other team.
image

When the form is public.
image

@btry
Copy link
Collaborator

btry commented Nov 10, 2022

Did you apply glpi-project/glpi#13226 ?

Also, please don't post the same things in several issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants