summaryrefslogtreecommitdiff
path: root/misc/ajax.js
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-06 07:28:29 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-06 07:28:29 +0000
commitfbd4f19d1224715ce1ea35064a07d128a8d35bb8 (patch)
treeda206da725679e459af0054768aa6ab2ff93128d /misc/ajax.js
parent3e9fec0adb0dcaa1a5b2f4e9df1619c00ed29802 (diff)
downloadbrdo-fbd4f19d1224715ce1ea35064a07d128a8d35bb8.tar.gz
brdo-fbd4f19d1224715ce1ea35064a07d128a8d35bb8.tar.bz2
- Patch #565808 by cha0s, Dave Reid, Alexander N: fixed nojs/ajax replacement.
Diffstat (limited to 'misc/ajax.js')
-rw-r--r--misc/ajax.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/ajax.js b/misc/ajax.js
index 016a953ce..785052f7b 100644
--- a/misc/ajax.js
+++ b/misc/ajax.js
@@ -107,7 +107,7 @@ Drupal.ajax = function (base, element, element_settings) {
// Replacing 'nojs' with 'ajax' in the URL allows for an easy method to let
// the server detect when it needs to degrade gracefully.
- this.url = element_settings.url.replace(/nojs/g, 'ajax');
+ this.url = element_settings.url.replace(/\/nojs(\/|$)/g, '/ajax$1');
this.wrapper = '#' + element_settings.wrapper;
// If there isn't a form, jQuery.ajax() will be used instead, allowing us to