Strip leading/trailing whitespace from extension url

This fixes #7043 by trimming the extension url input.