When I include the token submission:values in the confirmation page, and this page has a text format, the token renders as plain text, and not as html.

Reproduce:
Create a webform
Create a html textformat (without any filters)
Create a confirmation message with this text format, and add submission:values as value
Submit the form

All values are displayed in one row without any formatting.

CommentFileSizeAuthor
#2 sanitize_option_check-2958385-2.patch626 bytesjoshahubbers

Comments

JoshaHubbers created an issue. See original summary.

joshahubbers’s picture

StatusFileSize
new626 bytes

Cause/problem:
the token_replace function expects sanitize to be true or false. Currently, we only pass true when it is explicitly true. But when sanitize is a textformat, we submit false. This check should be other way around: only pass false when it is false, else we pass true.

Security effect: the token_replace function does not sanitze the values we submit, but values are always sanitized upon submit before entering this function, so that will not be a problem.

liam morland’s picture

Could you make a test for this? We should have a test anyway and it would help illustrate exactly what it does.

Why would $sanitize not be a Boolean?

liam morland’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is no longer supported. If this applies to a supported version, please re-open.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.