Manually creating a glossary item with a base 64 image / data url, the image is removed for no reason
This was originally reported as being a problem with the glossary import. But in reality import is working fine, it's just we disallow base64 / data url images for no documented reason. Original report:
I'm using moodle 3.1 , I'm assuming Marina's patches are installed.
I find that images inserted into the glossary using the picture icon on the toolbar appear, when exported, under the FILE tag in the xml file. Those xml files can be re-imported with no problem.
base64 images placed within the IMG tag in the html also work (and are exported) when pasted into the source code editing area in a glossary entry.
However, base64 images in the IMG tag in an XML import, even one generated by export from moodle, will not import. The import procedure seems to throw the base64 code away.
1. Create a new glossary and a new glossary entry
2. Edit the source code for the definition of the glossary entry and include a image encoded in base64 in an IMG tag in the html (e.g. https://jsfiddle.net/casiano/xadvz/)
3. Export the glossary to xml
4. create a new glossary and import the xml you exported before. The imported entry will not include the image.