Closed danmarsden closed 3 months ago
I'm going to try PARAM_TEXT but initially I choose PARAM_RAW to prevent string to be cleaned by moodle What do you think about that?
since PARAM_RAW "specifies a parameter that is not cleaned/processed in any way except the discarding of the invalid utf-8 characters", I prefer letting this because the data transmitted are imageDataUrl type
Isn't that just a url and not an image?
No this an ImageDataUrl string
generated by chemDodle lib
just looks like it's returning a url to me - not an actual image - eg: https://github.com/Laboratoire-de-Chemoinformatique/moodle-tiny_molstructure/blob/MOODLE_401_STABLE/classes/external/image_generator.php#L104
but - not going to block approval on this.
Yes it returns the url of the create image, stored in Moodle entry dataImagUrl -> out Url
right - so a url is just text and doesn't need to be PARAM_RAW - it's probably safe as PARAM_TEXT instead.
https://github.com/Laboratoire-de-Chemoinformatique/moodle-tiny_molstructure/blob/MOODLE_401_STABLE/classes/external/image_generator.php#L107
might be able to use PARAM_TEXT or something else there.