drupal_add_js and url encoding
Try this code

drupal_add_js(
  url(
    libraries_get_path('mylibrary') . '/MyLibrary.js', 
    array(
      'query' =&gt; array(
        'config' =&gt; MY_CONFIG_PARAM
      )
    )
  )
);