Author: ivaynberg Date: Fri Dec 4 06:16:38 2009 New Revision: 887081 URL: http://svn.apache.org/viewvc?rev=887081&view=rev Log: WICKET-2953 wicket:message can cause infinite loop in render Issue: WICKET-2953
Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_1.html wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.html Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java?rev=887081&r1=887080&r2=887081&view=diff ============================================================================== --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java Fri Dec 4 06:16:38 2009 @@ -364,8 +364,13 @@ if (component != null) { component.render(markupStream); + childTags.put(id, response.getBuffer()); } - childTags.put(id, response.getBuffer()); + else + { + markupStream.next(); + } + } finally { Modified: wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_1.html URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_1.html?rev=887081&r1=887080&r2=887081&view=diff ============================================================================== --- wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_1.html (original) +++ wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePageExpectedResult_1.html Fri Dec 4 06:16:38 2009 @@ -4,6 +4,10 @@ <wicket:message key="myKey">myValue</wicket:message> <wicket:message key="myKeyNotExsts"></wicket:message> <wicket:message key="myKey">myValue</wicket:message> + + <!-- wicket message with some raw markup --> + <wicket:message key="myKey">myValue</wicket:message> + <span wicket:id="message">here it goes</span> <span wicket:message="attr-name:i18n-key" attr-name="my i18n key">test 2</span> <span wicket:id="message2" wicket:message="attr-name:i18n-key" attr-name="my i18n key">here it goes</span> Modified: wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.html URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.html?rev=887081&r1=887080&r2=887081&view=diff ============================================================================== --- wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.html (original) +++ wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.html Fri Dec 4 06:16:38 2009 @@ -4,6 +4,10 @@ <wicket:message key="myKey">Default Text</wicket:message> <wicket:message key="myKeyNotExsts"/> <wicket:message key="myKey"/> + + <!-- wicket message with some raw markup --> + <wicket:message key="myKey">blah <a href="blah">blah</a> blah</wicket:message> + <span wicket:id="message">test</span> <span wicket:message="attr-name:i18n-key">test 2</span> <span wicket:id="message2" wicket:message="attr-name:i18n-key">test 2</span>