Skip to content

Commit

Permalink
Use protocol-less urls to reference CDN
Browse files Browse the repository at this point in the history
Fixes #19932
  • Loading branch information
vboctor committed Aug 17, 2015
1 parent 5414ba9 commit 0a45b7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/html_api.php
Expand Up @@ -367,7 +367,7 @@ function html_css() {
html_css_link( config_get( 'css_include_file' ) );

if ( config_get( 'cdn_enabled' ) == ON ) {
echo '<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">' . "\n";
echo '<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">' . "\n";
} else {
html_css_link( 'jquery-ui-1.11.4.min.css' );
}
Expand Down Expand Up @@ -447,8 +447,8 @@ function html_head_javascript() {
echo "\t" . '<script type="text/javascript" src="' . helper_mantis_url( 'javascript_translations.php' ) . '"></script>' . "\n";

if ( config_get( 'cdn_enabled' ) == ON ) {
echo "\t" . '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>' . "\n";
echo "\t" . '<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>' . "\n";
echo "\t" . '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>' . "\n";
echo "\t" . '<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>' . "\n";
} else {
html_javascript_link( 'jquery-1.11.3.min.js' );
html_javascript_link( 'jquery-ui-1.11.4.min.js' );
Expand Down
2 changes: 1 addition & 1 deletion core/http_api.php
Expand Up @@ -167,7 +167,7 @@ function http_security_headers() {

# White list the CDN urls (if enabled)
if ( config_get( 'cdn_enabled' ) == ON ) {
$t_cdn_url = 'https://ajax.googleapis.com';
$t_cdn_url = '//ajax.googleapis.com';
$t_style_src .= " $t_cdn_url";
$t_script_src .= " $t_cdn_url";
}
Expand Down

0 comments on commit 0a45b7b

Please sign in to comment.