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

Bugfix/FOUR-4408: Textarea Rich Text sanitizing Incorrectly (For 4.2) #4167

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

agustinbusso
Copy link
Contributor

@agustinbusso agustinbusso commented Nov 19, 2021

Issue & Reproduction Steps

Format in rich text is missing when a form text area variable is passed to a second task that use that variable in a rich text control and then is passed again to another task with form text area

Reproduction steps:

  • Create a process with 3 tasks:
    The first task will be a screen with a form text area and configured as rich text with the name form_text_area_1 with submit button.
    The second task will be a screen with a rich text control. Inside de control put the name of the previous form text area name in triple mustaches {{{form_text_area_1}}} with submit button.
    The third task should be the same screen from task 1.
    Screen Shot 2021-11-19 at 16 14 55

  • Start a new request, and in the first task add text with some formats (bold, colors, ...), submit the data
    In the second task you should see the data formatted, submit the task and in the third task you should see the data without format.

Solution

  • Added a new variable to request _DO_NOT_SANITIZE that have all the form text area controls names that should not be sanitized. This variable is available over all the process tasks.

How to Test

Same as Reproduction steps. Create a process with 3 task first and last task should have the same screen with a fomr text area control with rich text option enabled. The second task should have a rich text control with the form text area control variable name in triple mustaches. It is a good idea to test it placing the second task of the process inside a subprocess, or inside a loop. There are attached a zip with some processes that cover a lot of cases:

Processes_for_testing.zip

Working video

Screen.Recording.2021-11-19.at.16.43.23.mov

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@eiresendez eiresendez self-requested a review November 19, 2021 21:01
@runyan-co runyan-co requested review from runyan-co and removed request for eiresendez November 19, 2021 21:14
@pmkerberos
Copy link

QA server was successfully deployed https://bugfix-four-4408-processmaker.ci.processmaker.net

Copy link
Contributor

@runyan-co runyan-co left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, tested, and approved for 4.2

@runyan-co runyan-co merged commit 2279466 into develop Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants