From 747016b9d5112788e8a0a4583670a48b0423fc4a Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Sat, 10 Nov 2012 21:38:14 +0000 Subject: [PATCH] Media templates: Alter escaping regular expression to prevent it from aggresively consuming input meant for interpolation. see #22344, #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22539 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/media-models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/js/media-models.js b/wp-includes/js/media-models.js index 25becb231e..ab5bc42a79 100644 --- a/wp-includes/js/media-models.js +++ b/wp-includes/js/media-models.js @@ -80,7 +80,7 @@ window.wp = window.wp || {}; options = { evaluate: /<#([\s\S]+?)#>/g, interpolate: /\{\{\{([\s\S]+?)\}\}\}/g, - escape: /\{\{([\s\S]+?)\}\}/g + escape: /\{\{([^\}]+?)\}\}(?!\})/g }; return function( data ) {