mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Having recently worked with, and reviewed patches touching, this code it seemed that it's probably not a bad idea to move that functionality into `createValidAbsoluteUrl` as new options instead. For the `addDefaultProtocolToUrl` functionality in particular, the existing helper function was not only moved but slightly improved as well. Looking at the code, I realized that there's a small risk that it would incorrectly match a *relative* URL-string too. With these changes, the `createValidAbsoluteUrl` call-sites in the `src/core/`-code can be simplified a little bit. *Please note:* This patch may, indirectly, change the format of the `unsafeUrl`-property returned with relevant Annotations and OutlineItems; hence the `api-minor` tag. However, I'd argue that it's actually more correct this way since the whole purpose of `unsafeUrl` is/was to return the URL data as-is without any parsing done. |
||
---|---|---|
.. | ||
chromium | ||
font | ||
integration | ||
pdfs | ||
resources | ||
stats | ||
ttx | ||
types | ||
unit | ||
.eslintrc | ||
.gitignore | ||
add_test.js | ||
annotation_layer_builder_overrides.css | ||
downloadutils.js | ||
driver.js | ||
integration-boot.js | ||
test.js | ||
test_manifest.json | ||
test_slave.html | ||
testutils.js | ||
text_layer_test.css | ||
webserver.js |