Problem/Motivation

We have a checkbox with a label, for example:

This is a label <a href="https://mydomain.com/[token:tokenA]">click here</a> thanks.

This creates a Markup object and the code inside of WebformTokenManager dictates that tokens aren't replaced.

So attached a patch that allows token replacement.

Steps to reproduce

Create a checkbox element with a label that contains HTML (for example A link) and a token.

Remaining tasks

Testing / Review

Issue fork webform-3266907

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Mschudders created an issue. See original summary.

mschudders’s picture

StatusFileSize
new1.34 KB
mschudders’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 2: 3266907_token_replacement_markup.patch, failed testing. View results

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.82 KB

The attached webform replicates this issue.

jrockowitz’s picture

I am pretty sure #3245019: Validation messages escape HTML incorrectly cause this regression.

jrockowitz’s picture

Let's see if my MR addresses this regression/issue.

  • jrockowitz committed 7c4076e on 6.1.x
    Issue #3266907 by jrockowitz, Mschudders: Allow token replacement in...
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 7c4076e on 6.x
    Issue #3266907 by jrockowitz, Mschudders: Allow token replacement in...

  • jrockowitz committed 7c4076e on 6.2.x
    Issue #3266907 by jrockowitz, Mschudders: Allow token replacement in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.