MW version 1.34.2
page forms version: 4.9.5
When saving a page form containing a property with tokens, some characters are automatically replaced with entities, such as Ø -> Ø . When the item is edited and saved again, the ampersand is now expanded to Ø breaking the first entity.
Here is a minimal reproduction of the issue on the Semantic Mediawiki sandbox.
Form: https://sandbox.semantic-mediawiki.org/w/index.php?title=Formulaire:Example_token_entities_form_bug
Edited Item: https://sandbox.semantic-mediawiki.org/wiki/Page_forms_token_error (Page_forms_token_error)
Example
From form create a new Item and add to property Example_tokens: øysters.
The form saves succesfully and the template looks like this if you visit the source tab:
{{Example token entities |example_tokens=øysters }}
Go to form, write page title, click edit or create. Click save page.
Output is saved as
{{Example token entities |example_tokens=øysters }}
The & in ø now has been replaced with & invalidating the html entity which was created on first save.