foreach ($googlefonts as $v) { // loop
$app->getDocument()->addStyleSheet('//http://fonts.googleapis.com/css?family=' . $v . ':' . $font_weights . '&&subset=' . $font_subset . '&display=swap');
}
It appears that Joomla converts & amp ; & to & amp ; & amp ; & and when it gets parsed as XML it gets converted back and therefore not replaced.
You can find the discussion here in this forum
https://forum.joomla.de/thread/16020-jt-aldef-1-0-8-macht-probleme/?postID=108744#post108744