After looking at this and studying different approaches, I think I am going to implement a QWebEngineUrlRequestInterceptor that will simply screen all local urls to block any that do not target to something in the epub, or something in the local copies of mathjax or user css style sheets.
This approach should be faster as creating our own custom scheme protocal will need to double buffer (double read/write a file) to send replies while still allowing the main thread to access them.
So allowing localcontent can access file urls to be true and screening out any sneaky/malicious attempts seems the most straight forward approach.
|