H5P automatically purify text field which annoy me because the value is not use for display.
According to documentation :
« Type: text
Description: Defines all forms of text for display, from simple strings to HTML blocks. Several widgets are available for use in the editor for text fields. Strings will be purified and can contain HTML character references such as ' for an apostrophe. If not used for displaying HTML, strings might need de-purification. »
However, I can't find where is the purify function so that I know all I need to do to de-purify and be sure I don't miss any characters.
Any help on that ?
However this is complex, is there an easy way to de-purify or to disable purification ? Thanks !
edit2 : I think I will encode the text into base64, but it's not efficient in execution time and storage :/
edit3 : hum it seems that if I don't set the tag attribute, the purification will be simple : https://github.com/h5p/h5p-php-library/blob/fe3f4a504d27218b7ac47662e492... so it should be easy to depurify now I know that
edit4 : because double_encode is set to false, the function can't be reversed (as two different string can be encoded into the same things). So I am forced to use the base64 trick :(