summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '_static/doctools.js')
-rw-r--r--_static/doctools.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/_static/doctools.js b/_static/doctools.js
index 7d88f80..8cbf1b1 100644
--- a/_static/doctools.js
+++ b/_static/doctools.js
@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
- * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -29,9 +29,14 @@ if (!window.console || !console.firebug) {
/**
* small helper function to urldecode strings
+ *
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
- return decodeURIComponent(x).replace(/\+/g, ' ');
+ if (!x) {
+ return x
+ }
+ return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
@@ -296,12 +301,14 @@ var Documentation = {
window.location.href = prevHref;
return false;
}
+ break;
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
+ break;
}
}
});