Problem/Motivation

WebformOptionsHelper::splitOption() currently splits on all occurrences of the delimiter " -- ", but callers consume only the first two items. If a description contains the phrase " -- ", any text after it will be discarded.

Proposed resolution

Descriptions can be allowed to contain " -- " by passing a limit to explode():

  public static function splitOption($text) {
    return explode(static::DESCRIPTION_DELIMITER, $text, 2);
  }

Issue fork webform-3270541

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

ciss created an issue. See original summary.

ciss’s picture

Issue summary: View changes

jrockowitz’s picture

This change can also be applied to 6.1.x

jrockowitz’s picture

Version: 6.2.x-dev » 6.1.x-dev
jrockowitz’s picture

Status: Active » Reviewed & tested by the community

I tried changing the target to 6.1.x and does not seem to work as expected. I guess we can cherry pick the commit.

  • jrockowitz committed 538ed70 on 6.2.x authored by ciss
    Issue #3270541 by ciss: splitOption() discards description text after...

  • ciss authored 6579e12 on 6.1.x
    Issue #3270541 by ciss: splitOption() discards description text after...

  • ciss authored 6579e12 on 6.x
    Issue #3270541 by ciss: splitOption() discards description text after...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

  • ciss authored 6579e12 on 6.2.x
    Issue #3270541 by ciss: splitOption() discards description text after...

Status: Fixed » Closed (fixed)

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