From 0422f833a80a0ab438f445c4f94496af4534c3ac 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: http://core.svn.wordpress.org/trunk@22539 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 ) {