How do i create an item list where the item has a mixture of links and text If I add the following to my controller, the first item in the list displays correctly, but once I concatinate in text, the links are all escaped.  

 $basic_items[] = \Drupal::l('Basic example',Url::fromRoute('flot_examples.basic_usage'));
$basic_items[] = \Drupal::l('Different graph types', Url::fromRoute('flot_examples.series_types')) .
" and " .
\Drupal::l('simple categories/textual data', Url::fromRoute('flot_examples.categories'));

$output['basic'] = [
  '#title' =&gt; 'Basic Usage',
  '#theme' =&gt; 'item_list',
  '#items' =&gt; $basic_items,
];


I know the l() function in deprecated, and I should be using:

$basic_items[] = ['#type' =&gt; 'link', '#title' =&gt; 'Basic Example', '#url' =&gt; Url::fromRoute('flot_examples.basic_usage')];


instead, but I can't figure out how to get that to work either.
A simpler method is to use the t() function:

$basic_items[] = \Drupal::l('Basic example', Url::fromRoute('flot_examples.basic_usage'));
$string = '&lt;a href=":options_page"&gt;Setting various options&lt;/a&gt; and &lt;a href=":annotating_page"&gt;annotating a chart&lt;/a&gt;';
$options = [
  ':options_page' =&gt; Url::fromRoute('flot_examples.basic_options')-&gt;toString(),
  ':annotating_page' =&gt; Url::fromRoute('flot_examples.annotating')-&gt;toString(),
];
$basic_items[] = t($string, $options);

$output['basic'] = [
  '#title' =&gt; 'Basic Usage',
  '#theme' =&gt; 'item_list',
  '#items' =&gt; $basic_items
];