How to generate URL alias without %20 in URL?
It is proved that I wrote wrongly in the beginning, thanks @Beebee.


  I have read through the code of pathauto module. The module
  implements the token replacement after replacing the space with
  defined separator. So there is no clue by configuration. I would
  consider it is a design fault of the module.


pathauto module clean the url only when the token name does not match with the pattern /(path|alias|url|url-brief)\]$/. You can find it in the function pathauto_clean_token_values(). Obviously, the module author would like to prevent the url alias to be clean twice. As your field name is custom_url, so it is escaped from the checking.

You can fix this by changing your field name or writing your own module as I stated before.



If you know how to create custom module. I would recommend you to implement hook_pathauto_alias_alter for the purpose.

/**
 * Implements hook_pathauto_alias_alter().
 */
function mymodule_pathauto_alias_alter(&amp;$alias, array &amp;$context) {
  $separator = variable_get('pathauto_separator', '-');
  $alias = preg_replace('/\s+/', $separator, $alias);
}