I have found that when using an ampersand within a text field, the HTML output is incorrect after updating a post.
Steps to reproduce:
(Please note, I have left a space between the & and amp; to visually demonstrate)
Using a basic text field and including something like:
this & amp; that
After the post is published or updated, the field from the admin changes to:
this & that
At this point the output seems to be correct as the HTML will show as:
this & amp; that
If you now go in to update your post (click update)…the ampersand now reverts the HTML output to:
this & that
In my understanding this is incorrect as the ampersand is not escaped. It appears the problem occurs when the text field removes the escaped ampersand and replaces it with a ‘&’. When updating the post the HTML output does not escape the ampersand.
=============
Note: I have found a work-a-round by using htmlentities. Not sure if this is the desired solution.
Please open a new support ticket for this bug so that they can pass it along to the developer https://support.advancedcustomfields.com/new-ticket/
Thanks John, I have gone ahead and opened a support ticket as suggested.
Can we ( the public ) all see the solution please?