I can't save encoded URLs in a MetaBox text field

Support General I can't save encoded URLs in a MetaBox text fieldResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43892
    ArnoArno
    Participant

    Hello,

    If I enter an encoded URL in a text field, the encodings are removed.

    For example, if I enter this:
    https%3A%2F%2Fwww.example.com

    it saves this:
    httpswww.example.com

    I need it to save what I entered, without changes.

    I found a workaround: the value is correctly saved if I use the inline edit on that field in the post listing (via the Admin Columns plugin). That seems proof that MetaBox is changing the value if I edit the field when the post is in edit mode.

    How can I prevent this?

    Kind regards,
    Arno

    #43900
    PeterPeter
    Moderator

    Hello Arno,

    You can try to use the bypass sanitization and add the encoded URL to the text field again. Following the documentation https://docs.metabox.io/sanitization/#bypass-the-sanitization

    #43906
    ArnoArno
    Participant

    Hi Peter,

    Thanks, that's the kind of simple solutions I love!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.