From 3485f6530a3a7399e91cc713cba399166ea4aa99 Mon Sep 17 00:00:00 2001 From: Tim Tucker Date: Mon, 3 Sep 2012 13:52:30 -0300 Subject: [PATCH] Update media/src/core/core.info.js Use greedy match regex for replacements Otherwise, you could have: "_START_ of _TOTAL_, showing _START_ to _END_" replaced as: "1 of 5, showing _START_ to 3" --- media/src/core/core.info.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/media/src/core/core.info.js b/media/src/core/core.info.js index da8f35f3..f8bb4655 100644 --- a/media/src/core/core.info.js +++ b/media/src/core/core.info.js @@ -1,5 +1,4 @@ - /** * Generate the node required for the info display * @param {object} oSettings dataTables settings object @@ -109,9 +108,9 @@ function _fnInfoMacros ( oSettings, str ) } return str. - replace('_START_', sStart). - replace('_END_', sEnd). - replace('_TOTAL_', sTotal). - replace('_MAX_', sMax); + replace(/_START_/g, sStart). + replace(/_END_/g, sEnd). + replace(/_TOTAL_/g, sTotal). + replace(/_MAX_/g, sMax); }