[ https://issues.apache.org/jira/browse/WICKET-5519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13913091#comment-13913091 ]
Martin Grigorov commented on WICKET-5519: ----------------------------------------- I am not sure which change in Wicket made parsing more strict but the simple fix is to make the <meta> tags auto-closed: return StringHeaderItem.forString("<meta http-equiv=\"" + httpEquiv + "\" content=\"" + content + "\"/>"); This fixes the problem. > ContributorListenerCollection behaves differently after upgrade > ---------------------------------------------------------------- > > Key: WICKET-5519 > URL: https://issues.apache.org/jira/browse/WICKET-5519 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 6.7.0 > Reporter: Ufuk Altin > Attachments: myproject.zip > > > I used Wicket 6.6.0 and upgraded to 6.14.0 (and tested it also on 6.7.0). In > WicketApplication I have the following code within the init()-Method > {code:title=WicketApplication.java|borderStyle=solid} > @Override > protected void init() { > super.init(); > getHeaderContributorListenerCollection().add(new IHeaderContributor() { > private static final long serialVersionUID = 442899940490126649L; > @Override > public void renderHead(final IHeaderResponse response) { > response.render(WicketUtils.composeMetaItem("X-UA-Compatible", > "IE=edge")); > response.render(WicketUtils.composeMetaItem("Content-Type", > "text/html; charset=UTF-8")); > response.render(WicketUtils.composeMetaItem("Expires", "0")); > response.render(WicketUtils.composeMetaItem("Cache-Control", > "no-store, no-cache, must-revalidate, max-age=0, private")); > response.render(WicketUtils.composeMetaItem("Pragma", > "no-cache")); > } > }); > } > {code} > Which renders metadata in the html head. > This causes, after the update to Wicket 6.14.0 and 6.7.0, the Wicket Debugger > to throw an Error after I do an ajax request. The error is not thrown if the > above code is removed. > The Error is the following: > {quote} > {color:red} > ERROR: > {color} > Error in parsing: This page contains the following errors:error on line 22 at > column 8: Opening and ending tag mismatch: meta line 0 and head > Below is a rendering of the page up to the first error. > {quote} > Would it be possible to put the above metadata in HTML and what would be the > difference? > {code:title=Template.html|borderStyle=solid} > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <wicket:head> > <meta http-equiv="X-UA-Compatible" content="IE=edge"> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> > <meta http-equiv="Expires" content="0"> > <meta http-equiv="Cache-Control" content="no-store, no-cache, > must-revalidate, max-age=0, private"> > <meta http-equiv="Pragma" content="no-cache"> > </wicket:head> > ... > </html> > {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)