Problem/Motivation

When I add a js script that have .split("&"), the char "&" is replaced by .split("&"), and this broken this code

Proposed resolution

Add Drupal\Core\Render\Markup::create() method to return value:

      $attachments['#attached']['html_head'][$i] = [
        [
          '#type'  => 'html_tag',
          '#tag'   => $script_tag,
          '#value' => Markup::create($value),
        ],
        'header-and-footer-scripts-' . $i,
      ];
CommentFileSizeAuthor
#2 3188561-2.patch691 bytesthalles

Comments

thalles created an issue. See original summary.

thalles’s picture

Status: Needs work » Needs review
StatusFileSize
new691 bytes

Follow a patch that fix this issue. Congratulations on this module, it is very useful!

thalles’s picture

Issue summary: View changes
thalles’s picture

Issue summary: View changes
deg’s picture

Thanks! Additional instances of `'#value' =>` changed in the patch at https://www.drupal.org/project/header_and_footer_scripts/issues/3050967#...

sasiddiqui’s picture

This issue was fixed in v3.0.0.

sasiddiqui’s picture

Assigned: Unassigned » sasiddiqui
Status: Needs review » Fixed
sasiddiqui’s picture

Status: Fixed » Closed (fixed)