Description: Fix for html privacy breach
 External js links in html leads to privacy breach. These links
 has been revised to use js libraries instead of external links.
Forwarded: not-needed
Author: Yogeswaran Umasankar <yogu@debian.org>
Last-Update: 2024-03-28

--- a/docs/_templates/index.html
+++ b/docs/_templates/index.html
@@ -10,8 +10,7 @@
     <title>Memray: the endgame memory profiler</title>
 
     <!-- Bootstrap core CSS -->
-    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
-    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet">
+    <link href="/usr/share/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet">
 
     <!-- Custom styles for this template -->
     <link href=" {{ pathto('_static/css/custom.css', 1) }}" rel="stylesheet">
@@ -143,9 +142,7 @@
                             role="button">See how &raquo;</a></p>
                 </div><!-- /.col-lg-4 -->
                 <div class="col-lg-4">
-                    <img class="rounded-circle rounded-header-image"
-                        src="https://docs.pytest.org/en/7.2.x/_static/pytest_logo_curves.svg" alt="pytest logo"
-                        width="140" height="140">
+                    <div style="width: 140px; height: 140px;"></div>
                     <h2>Prevent regressions</h2>
                     <p>
                         You can easily integrate Memray into your pytest test suite. Learn where each test is
@@ -368,10 +365,8 @@
     <!-- Bootstrap core JavaScript
       ================================================== -->
     <!-- Placed at the end of the document so the pages load faster -->
-    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
-        integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
-        crossorigin="anonymous"></script>
-    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
+    <script src="/usr/share/javascript/jquery/jquery.min.js"></script>
+    <script src="/usr/share/javascript/bootstrap/js/bootstrap.min.js"></script>
 
     <!-- Custom JS -->
     <script src="{{ pathto('_static/js/custom.js', 1) }}"></script>
--- a/src/memray/reporters/templates/base.html
+++ b/src/memray/reporters/templates/base.html
@@ -8,7 +8,7 @@
   <title>memray - {{ title }}</title>
 
   {%- block styles -%}
-  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
+  <link href="/usr/share/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet">
   {%- endblock styles -%}
 </head>
 
@@ -137,10 +137,10 @@
   {% endblock extra_modal %}
 
   {% block scripts %}
-  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
-  <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
-  <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js"></script>
-  <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
+  <script src="/usr/share/nodejs/popper.js/dist/esm/popper.min.js"></script>
+  <script src="/usr/share/javascript/jquery/jquery.min.js"></script>
+  <script src="/usr/share/javascript/bootstrap/js/bootstrap.min.js"></script>
+  <script src="/usr/share/javascript/lodash/lodash.min.js"></script>
   <script src="https://cdn.jsdelivr.net/npm/plotly.js@2.11.1/dist/plotly.min.js"></script>
   <script type="text/javascript">
     const packed_data = {{ data|tojson }};
--- a/src/memray/reporters/templates/table.html
+++ b/src/memray/reporters/templates/table.html
@@ -38,8 +38,8 @@
 
 {% block scripts %}
 {{ super() }}
-<script src="https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js"></script>
-<script src="https://cdn.datatables.net/1.10.23/js/dataTables.bootstrap4.min.js"></script>
+<script src="/usr/share/javascript/jquery-datatables/jquery.dataTables.min.js"></script>
+<script src="/usr/share/javascript/jquery-datatables/dataTables.bootstrap4.min.js"></script>
 <script type="text/javascript">
   {{ include_file("assets/table.js") }}
 </script>
--- a/src/memray/reporters/templates/flamegraph.html
+++ b/src/memray/reporters/templates/flamegraph.html
@@ -91,7 +91,7 @@
 
 {% block scripts %}
 {{ super() }}
-<script src="https://d3js.org/d3.v4.min.js" charset="utf-8"></script>
+<script src="/usr/share/javascript/d3/d3.min.js" charset="utf-8"></script>
 <script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
 <script src="https://cdn.jsdelivr.net/npm/d3-tip@0.9.1/dist/index.min.js"></script>
 <script src="https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.min.js"></script>
