Support

Account

Home Forums General Issues acf field type wysiwyg editor is stripping question mark from UTM breaking link

Helping

acf field type wysiwyg editor is stripping question mark from UTM breaking link

  • I have an ACF wysiwyg editor where I need to put a link in as raw text/html

    like:

    <a class="home-hero-tc-cta" href="https://web.com/pagename?utm_campaign=campaign%20name&utm_source=Homepage%20Hero&utm_medium=From%20the%20homepage">Register Now</a>

    but it remove the question mark and breaks so it does

    <a class="home-hero-tc-cta" href="https://web.com/pagenameutm_campaign=campaign%20name&utm_source=Homepage%20Hero&utm_medium=From%20the%20homepage">Register Now</a>

    and it 404s.

    https://www.reddit.com/r/Wordpress/comments/btazok/wordpress_stripping_code_from_acf_fields/

    >For the text field for custom scripts, is it a WYSIWYG field or just a textarea field? WordPress does not like scripts in WYSIWYG fields, it will remove them altogether if on the Visual Editor portion and saving. If on HTML view, they likely would be retained but in general WP does not want scripts/HTML code in WYSIWYG fields.

    It’s WYSIWYG and its not a script

    https://support.advancedcustomfields.com/forums/topic/regression-backslashes-stripped-in-wysiwyg/

    not backslashes

    I can’t find anything online explaining this.

    How do you keep question marks in WYSIWYG editor in wordpress acf to keep question marks in url

  • I just tested this and I’m seeing no issue with the ? being removed from the link.

    Are you adding the entire html code for the link while in “Visual” or “Text” mode of the editor?

    Do you have other plugins active? Have you tried deactivating them to see if there is something else causing this?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.