WordPress is stripping spaces out of links.
For example putting this into the web address of a new link:
mailto:my@email.com?subject=Hello there
and saving results in this:
mailto:my@email.com?subject=Hellothere
I know that a space is %20
but my clients can’t be expected to use this. Plus they may be uploading PDFs/Word documents with spaces in the filename and copying and pasting the link.
How can I remedy this? I know I have to use urlencode, however I don’t really want to edit the core wordpress admin, because on upgrading I’ll have to change it again. However, I will do if its the only way (having a look I can’t seem to find a hook or anything that will let me do this!), but I just can’t figure out where to put it.
Thanks for any/all help you can give me.
You can use the
antispambot()
function for this.Example: