Revert r49669, r49670 "extract text layer from djvu file (see bug 18046)"
I don't really like the use of sed here; it's an extra Unix dependency which seems unnecessary, when we could trivially do the escaping in the code.
The ajax fetch added in r49670 also looks like a big security hole:
* Manual use of curl should be avoided; it may not be installed, and 'localhost' may not do anything useful.
* Further this appears to be a general "fetch any foreign URL and pass the data through" which is a serious security hole.