• I use Advanced Custom Field and I have a text field set up for the javascript to redirect to the entered URL.

    window.location.replace('<?php the_field('url'); ?>');

    The problem is that if the URL has special characters such as “&”, it automatically encodes to “& a m p ;” so that the link does not work.

    Can anyone tell me how to avoid this conversion?

    Thanks in advance.

  • The topic ‘Special character issue’ is closed to new replies.