From ffd08766259e43b7a6253ccf24a4610220173d36 Mon Sep 17 00:00:00 2001 From: julianchristmas Date: Sat, 2 Dec 2017 23:08:32 +0100 Subject: [PATCH] Removed protocol relative URL for jQuery Nowadays the tendency of the web is to move to HTTPS, so the use of protocol-relative URLs has become an anti-pattern therefor I make this commit to update the codebase to reflect this. Furthermore, I have added charset="utf-8" and type="text/javascript" to tag_css and tag_js as to follow best practice. --- src/MaterializeCSSBuilder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MaterializeCSSBuilder.php b/src/MaterializeCSSBuilder.php index 24941f3..d58ab5e 100755 --- a/src/MaterializeCSSBuilder.php +++ b/src/MaterializeCSSBuilder.php @@ -13,7 +13,7 @@ class MaterializeCSSBuilder { public static function include_full() { $return = self::include_css(); - $return .= self::tag_js('//code.jquery.com/'.self::$file_jquery); + $return .= self::tag_js('https://code.jquery.com/'.self::$file_jquery); $return .= self::include_js(); return $return; } @@ -61,13 +61,13 @@ public static function get_url_js($full=false, $secure=false) { } private static function tag_css($path) { - return ''; + return ''; } private static function tag_js($path) { - return ''; + return ''; } } -?> \ No newline at end of file +?>