bug: 'ionic upload' replaces single quotes in my index.html with `'` and '&' with `&`
Type: bug
Platform: all
Whenever executing ionic upload my index.html file changes all single quotes to ' and all "&" with &
Example:
<span ng-show="vm.searching && !vm.found">
<i class="icon ion-search"></i>
</span>
Turns into:
<span ng-show="vm.searching && !vm.found">
<i class="icon ion-search"></i>
</span>
System Info: Cordova CLI: 5.3.3 Ionic Version 1.1.0 Ionic CLI Version: 1.6.5 Ionic App Lib Version: 0.3.9 OS: Windows 8.1 Node Version: v4.1.0
+1
+1 My Content-Security-Policy goes from:
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *">
To:
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *">
Environment: Cordova CLI: 5.4.0 Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.0 Ionic Version: 1.1.1 Ionic CLI Version: 1.7.8 Ionic App Lib Version: 0.6.4 OS: Windows 10 Node Version: v4.2.2
+1
Can you let us know here? https://github.com/driftyco/ionic-io-issues/issues. Seems related to CLI or platform. cc @ericb
+1 This must be a issue with how encoding is done on page index.html.
I use Visual Studio 2015 Update 1 and i have set encoding to UTF-8 without signature - Codepage 65001 that someone tip me about.
In Content Security Policy it switches some of the ' signs to &apos.
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval';img-src 'self' data: https://*; style-src http://* https://* 'unsafe-inline'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'">
This is happening when i use Ionic Upload command and i think it is cachebuster you run with ionic upload that ruins index.html file..
If i remove Content Security meta it works...and it dont scramble index.html..
+1
+1
+1
This is more a problem with editor - like Visual Studio that maybe save files in bad encoding. When coding angular use Visual Code or Notepad. :) I guess Ionic team can try to parse index file when doing Ionic Upload... but not that big problem because solution is simple.