Support » Fixing WordPress » Using esc_url

  • Hi,

    I’d like to use the esc_url function in WP, but not have it remove spaces in the input.

    How do I achieve this?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Spaces are not valid in URLs..

    Thanks for this.

    I’m actually hoping to use the URL field for different data.

    It would store the ‘Location’ of the user.
    Does it make sense to do this, or is it easier to add another field to the Comments box? Is this even possible?

    Thanks again

    I’d suggest adding your own field…

    This blog is the best i could find for explaining the process.. (usage differs to how you’d want to use it, but it will give you the necessary info).

    Using WordPress Comment Meta

    Awesome Mark!!! I will take a look into this. Many thanks.

    I didn’t really explain myself in the last response, so..
    Rather then modifying an existing field, you add your own comment meta data, just like those that currently exist, name, email, url… etc..

    The blog above gives a very basic example of adding a field to the comments form and the procedure for displaying and saving that data.
    Happy i could help, and you don’t necessarily need pay attention to the above, it’s simply for clarity, incase other users stumble on this thread searching for similar information..

    Post back if you get stuck.. 😉

    Good call. It’s a frustrating experience when the OP just adds ‘It’s ok, I got it working’….and then nothing 🙂

    Thanks for your assistance. Will let you know how it goes.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using esc_url’ is closed to new replies.