function escapePromptURL(url) {
    return encodeURI(url).replace(/([\\()])/g, '\\$1');
}
Encode and escape URLs to prevent breaking up rendered Markdown links.
@param {string} url The url of the link or image