Kickstart with static ip fails

I have just spend some time figuring out why I couldn’t provision a host with AlmaLinux 9 via UEFI/PXE but instead always ended up at grub2 shell and not the menu after it loaded the grub.cfg file for the host. The culprit is the unquoted ampersand in the ks URL. This has been generated for my host:

# This file was deployed via 'Kickstart default PXEGrub2' template

set default=0
set timeout=10

menuentry 'Kickstart default PXEGrub2' {
  linuxefi boot/almalinux-9-baseos-x86_64-os-16602-vmlinuz  BOOTIF=01-11-22-33-44-55-66 inst.ks= ...
  initrdefi boot/almalinux-9-baseos-x86_64-os-16602-initrd.img

Notice the static=1&token part. According to it needs to be quoted or escaped. It gets generated by snippet kickstart_kernel_options, when boot mode is static:

  if (is_fedora && os_major >= 33) || (rhel_compatible && os_major >= 9)
    if subnet4 && !subnet4.dhcp_boot_mode?
      options.push("inst.ks=#{foreman_url('provision', static: '1')}")
    elsif subnet6 && !subnet6.dhcp_boot_mode?
      options.push("inst.ks=#{foreman_url('provision', static6: '1')}")
      options.push("inst.ks=#{foreman_url('provision')}", "inst.ks.sendmac")

Expected outcome:
Booting and installing the server…

Foreman and Proxy versions:

After digging into the redmine issues I have eventually found this bug report: Bug #35682: PR #9238 breaks specific provision scenarios - Foreman

This fix worked for me - i just unlocked the template in gui and manually edited it for now and i fully expect this to break on every update until it gets fixed in a release (which i hope is already done)