If you don’t need the <br> tags to display the address then change the format of the textarea to “No Formatting”. If you do need the breaks then you’ll need to do a string replace to remove them. Something like
$address = str_replace('<br />', ', ', $address);
I’d probably also make it a proper query value with
$address = urlencode($address);
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘Escaping HTML – br tag’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users