Add '?' and '=' characters to query string I'm trying to pass '?' and '=' symbols to a page using routing.yml

company.calc:
  path: '/form?company={nid}'
  defaults:
    _controller: FrameworkBundle:Redirect:redirect
    _title: 'Calc'
 requirements:
   _permission: 'access content'


but the symbols are transcoded to HTML-entities. It looks like form%3Fcompany%3D%3Fcompany%3D18141 and leads to page 404.

Any ideas how to pass the string like 

/form?company=1234 


? This string is necessary to prepopulate the form's field.

Find the same question here but no reply, no solution :(.
You declare query parameters in drupal routes in a mymodule.routing.yml file like this:

mymodule.mailcommitter:
  path: '/mailcheck/{uid}'
  defaults:
    _controller: '\Drupal\mymodule\Controller\ProfilController::checkMailCommit'
    _title: 'commit mail'
  options:
      query:
        token: ""
  requirements:
    _permission: 'access content'


Then, you build an url by route like so

'url' =&gt; Url::fromRoute('mymodule.mailcommitter', ['uid' =&gt; 1], ['query' =&gt; ['token' =&gt; 'hello']])


Also check this doc: https://www.drupal.org/docs/8/api/routing-system/parameters-in-routes/using-parameters-in-routes