Home › Forums › Front-end Issues › Wysiwyg replaces spaces with › Reply To: Wysiwyg replaces spaces with
I can only assume that you have a group field called “bakgrund” and “del1” is a wysiwyg field sub field of this group.
getting the field should format the wysiwyg sub fields
I am lost as to why you are doing this
$infostring1 = html_entity_decode($background['del1']);
$infostring1 = preg_replace("/\s/",'',$infostring1);
$infostring1 = htmlentities($infostring1);
as it is removing all of the html formatting applied to the wysiwyg field.
Why are you not just using echo $background['del1'];
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.