Fix loading ACBF image urls when they use backslashes.

Authored by woltherav on Sep 4 2018, 4:29 PM.



Noticed when I was poking at my comic collection and noticed this one didn't like being loaded:

In the file, the jpegs are being referenced as 01\image01.jpg.

I was very surprised, QT usually takes care of this, but here it does not. With that in mind, should it thus be fixed here or in ArchiveImageProvider?

Test Plan

Open the above file in peruse. It will not work without the patch but will work with.

Diff Detail

R157 Peruse
Lint Skipped
Unit Tests Skipped
woltherav requested review of this revision.Sep 4 2018, 4:29 PM
woltherav created this revision.
leinir accepted this revision.Sep 5 2018, 8:03 AM

Hmmmmm... well, backslashes in URLs isn't proper XML, so it would /seem/ to make sense, even for roundtripping, that we just refuse to output improper data into ACBF... though, at the same time, making the imageprovider more robust is perhaps not a silly idea either... It does all seem a little strange, though, like you say. If you could add a comment here describing why we're doing that string replacement (something like "While URLs should always use forward slashes, books exists in the wild which do not, and we have to be able to consume those files as well" would be handy for future reference, but whatever you feel is good, i'll accept it as is :) )

This revision is now accepted and ready to land.Sep 5 2018, 8:03 AM
This revision was automatically updated to reflect the committed changes.