tkyaji / cordova-plugin-crypt-file

This plugin to encrypt the source files.
Apache License 2.0
178 stars 116 forks source link

This plugin breaks internal links #22

Closed Joe23 closed 7 years ago

Joe23 commented 7 years ago

It looks like this plugin break the internal link, with ionic framework.

How to reproduce it:

ionic start myApp blank
cd myApp
cordova plugin add cordova-plugin-crypt-file
# In www/index.html add two links
#                <a href="x1.html">X1</a>
#                <a href="x2.html">X2</a>
# add the x1.html and x2 two file in www folder
ionic platform add android
#add key sign file if needed
ionic build --release

Then install the apk, the above two links do not work. When you click there is no response. no error message either. remove plugin things work perfectly.

ENV OS Debian GNU/Linux 8 node 4.4.4 cordova 6.1.1 ionic 1.7.16 java 1.8.0_25 Android 4.4.4 x86 in virtualbox

Joe23 commented 7 years ago

OK, after reading the source code, I think I know the cause at https://github.com/tkyaji/cordova-plugin-crypt-file/blob/master/src/android/com/tkyaji/cordova/DecryptResource.java#L26 and later function remapUri , which rewrite the URI to the cdvplugin://DecryptResource

But I don't know exactly the cause though.