I have a general function that retrieves URLs. This particular function is part of a plugin and returns URLs to various resources such as images and stylesheets within the plugin.
GET parameters are used in these URLs for proper functionality.
To ensure W3C validation when using these URLs in an HTML page, I must replace ampersands with & like so:
/plugin.php?plugin=xyz&resource=stylesheet&....
However, when utilizing the URL as the "url" parameter in an AJAX call, the ampersand is not interpreted correctly, causing issues with my calls.
Is there a way to make & work in AJAX calls?
I would prefer not to complicate the URL generation process by adding additional parameters (such as intendedUse="ajax") or manipulating the URL in Javascript. I plan on reusing this plugin model multiple times, possibly by many individuals, and want to keep it as straightforward as possible.