Also Image questions need to be handled separately. Same is the case with formatting. ODK allows markdown based formatting. So html to makrdown conversion needs to happen as well.
https://github.com/Sunbird-Ed/program-service/blob/8dfbf3efb65e886933bb0d788dd5281000d1aa07/src/service/print/pdf.js#L209
https://github.com/Sunbird-Ed/program-service/blob/8dfbf3efb65e886933bb0d788dd5281000d1aa07/src/service/print/pdf.js#L274
This method can be directly used.
I tweaked the first part and am now excluding tags from stripping out: ref
For the second, I'm not sure where exactly & how to use this function
Please also elaborate how to handle media-based questions.
UPDATE (2022-08-10): Image-based questions & other issues have been resolved now. Rest pending is the rendering of inline HTML support in Android phones (which is to be clarified with Android dev separately as discussed)
I tweaked the first part and am now excluding tags from stripping out: ref
For the second, I'm not sure where exactly & how to use this function
Please also elaborate how to handle media-based questions.
UPDATE (2022-08-10): Image-based questions & other issues have been resolved now. Rest pending is the rendering of inline HTML support in Android phones (which is to be clarified with Android dev separately as discussed)