I am trying to:
I have a couple custom cells for displaying data in different formats. There is a text area in one of the custom cells that accepts any text. If a user enters a special character like an apostrophe (') or ampersand (&), it is translated to its HTML hexadeciml special character code when pulled from the database. However, the next time a user edits the text, the code is re-translated because it has an ampersand in it. So, ' - the code for apostrophe - becomes ' - because the & in the special character is also translated into a character code.
Link to a page where the issue can be seen:
hidden link
I expected to see:
In the Degree Grad Requirements box, the text should read "Learn about UD's academic requirements for graduation. "
Instead, I got:
The box instead reads: "Learn about UD's academic requirements for graduation. "
Note that we are using IIS to serve the site.
Here is PHP snippet that creates the box in the custom cell:
<li>
<label for="<?php the_ddl_name_attr('oet_polaroid_text'); ?>"><?php _e('Description', 'ddl-layouts') ?>:</label>
<textarea id="oet_polaroid_text" cols="80" name="<?php the_ddl_name_attr('oet_polaroid_text'); ?>"></textarea>
</li>
I can see with the example we provide here the same issue:
https://toolset.com/documentation/programmer-reference/layouts-cells-api/
I think this is due to how the inputs are registered.
I see some differences for example from the Caption of a slider (translatable) to the one in the DOC, which is not, and throws that unexpected encoded value.
I reported this issue and we will see to update the DOC and/or fix Layouts in regard.
For now I did not find a proper solution but I think it should be possible to intercept and work with htmlentities() and html_entity_decode().
But I did not try this.
I'll feedback here when I have news about this.
This results as resolved now
Please let me know if it is solved for you as well using the latest Toolset release you can find in your account:
toolset.com/accounts/download
You can also find the updates in the plugins area in the Commercial tab, after eventually clicking once "check for updates".
Thanks!
My issue is resolved now. Thank you!