We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc7e889 commit 41e7f75Copy full SHA for 41e7f75
hooks/after_prepare/010_add_platform_class.js
@@ -37,8 +37,13 @@ function addPlatformBodyTag(indexPath, platform) {
37
newBodyTag = bodyTag.replace(classAttr, newClassAttr);
38
39
} else {
40
+ // The bodyTag contains only the first found of `>`, due to the return of the first element of the array from method
41
+ // (findBodyTag)[https://github.com/xlts-dev/angularjs-ionic-v1/blob/c553c973d85142e66f119aed2fe3db83775f5f2b/hooks
42
+ // /after_prepare/010_add_platform_class.js#L57]. Therefore, we should replace only one tag.
43
+ // Fix https://github.com/xlts-dev/angularjs-ionic-v1/security/code-scanning/1 CodeQL warning
44
+ var closingBracketIdx = bodyTag.indexOf('>');
45
// add class attribute to the body tag
- newBodyTag = bodyTag.replace('>',' + platformClass + ' ' + cordovaClass + '">');
46
+ newBodyTag = bodyTag.slice(0,closingBracketIdx)+' class="' + platformClass + ' ' + cordovaClass + '"'+bodyTag.slice(closingBracketIdx);
47
}
48
49
html = html.replace(bodyTag, newBodyTag);
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments