You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this module - it's serving as a really useful example for me at the moment. However, as reported here by Valery, the output does seem to get double entity encoded when displayed in the containing PW page.
I can only guess that the containing page (or fieldset) is entity encoding the string from Event.php#96.
Whilst forcing output formatting on (line 95) does cause the event's fields to be entity encoded, the entire output including html markup in line 96 seems to be encoded later leading to it not displaying as desired and with double encoding of values from the fields. For example...
The text was updated successfully, but these errors were encountered:
when I create Fieldtypes with multiple subfields I always html-escape their string values and I usually add a method getUnformatted($key) for retrieving the unformatted values.
Another option would be to make the value object (Event in this case) implement PageFieldValueInterface, but then you would have to manage the internal formatted status. When fetching the internal subfields (::get($key)) you would have to check for the formatted status and format (or not) the requested value accordingly.
kind regards
PS
I then use the getUnformatted($key) when populating the inputfields...
@ryancramerdesign
Thanks for this module - it's serving as a really useful example for me at the moment. However, as reported here by Valery, the output does seem to get double entity encoded when displayed in the containing PW page.
I can only guess that the containing page (or fieldset) is entity encoding the string from Event.php#96.
Whilst forcing output formatting on (line 95) does cause the event's fields to be entity encoded, the entire output including html markup in line 96 seems to be encoded later leading to it not displaying as desired and with double encoding of values from the fields. For example...
The text was updated successfully, but these errors were encountered: