我为 esi:include 使用 AttributeModifier 创建的 URL 有问题。当 URL 在页面上呈现时,它会被编码。
WebMarkupContainer esiSrc = new WebMarkupContainer("esiSrc");
String esiUrl = "http://domain.tld/blah/that?param1=abc¶m2=123";
esiSrc.add(new AttributeModifier("src", new Model<string>(esiUrl)));
esiSrc.setEscapeModelStrings(false);
add(esiSrc);
HTML:
<esi:include wicket:id="esiSrc" ttl="12h" onerror="continue" />
渲染的输出是:
<esi:include ttl="12h" onerror="continue" src="http://domain.tld/blah/that/?param1=abc&param2=123" />
有什么建议么?