Simple config file change to ensure that Sitecore Urls are formatted nicely replacing spaces (%20) with hyphens (-). Note that this also includes the setting to add the hypen to the "InvalidItemNameChars" list to ensure users cannot name Items with hyphens in them. If they do this, the replace will remove the hyphen and you end up with an invalid URL.
<!--
Change 1:
To have spaces be changed to hyphens, you need to edit Sitecore’s web.config and tell it to replace " " with "-". In the "encodeNameReplacements" node, we add the final "replace" node seen below.
-->
<encodenamereplacements>
<replace mode="on" find="&" replaceWith=",-a-," />
<replace mode="on" find="?" replaceWith=",-q-," />
<replace mode="on" find="/" replaceWith=",-s-," />
<replace mode="on" find="*" replaceWith=",-w-," />
<replace mode="on" find="." replaceWith=",-d-," />
<replace mode="on" find=":" replaceWith=",-c-," />
<replace mode="on" find=" " replaceWith="-" />
</encodenamereplacements>
<!--
Change 2:
Because of this change, whenever someone requests a page with a hyphen, Sitecore is going to assume that it needs to be translated to a space which will cause issues so you also need to configure Sitecore to not allow content managers to use hyphens in their Item names. Change is again made in the web.config file.
-->
<setting name="InvalidItemNameChars" value="\/:?"<>|[]-/>.