From c65c88665135b21ef56fbf330ca91b247e357b93 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Tue, 11 Feb 2014 10:35:09 +0000 Subject: [PATCH] Issue #2192809 by andrejsmuzikovs: Drupal.formatString() doesn't properly replace all placeholders. --- core/misc/drupal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/misc/drupal.js b/core/misc/drupal.js index 3435dc09bc86..cedef6728ade 100644 --- a/core/misc/drupal.js +++ b/core/misc/drupal.js @@ -276,7 +276,8 @@ if (window.jQuery) { if (keys.length) { for (var i = 0; i < fragments.length; i++) { - fragments[i] = Drupal.stringReplace(fragments[i], args, keys); + // Process each fragment with a copy of remaining keys. + fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); } } -- GitLab