Hi, I'm developing a plugin that gets form values and displays them on a new page. The form values contain html tags. However, when I use ${variable-name}, the tags are not rendered. What do I do to render the html elements?
My action class:
package com.example.plugin;
import com.atlassian.confluence.core.ConfluenceActionSupport;
import com.opensymphony.xwork.Action;
public class ComparatorPluginResultAction extends ConfluenceActionSupport {
private String pageVersion1;
private String pageVersion2;
public String execute() throws Exception { return Action.SUCCESS; }
public String getPageVersion1() { return this.pageVersion1; }
public String getPageVersion2(){ return this.pageVersion2; }
public void setPageVersion1(String pageVersion1){ this.pageVersion1 = pageVersion1; }
public void setPageVersion2(String pageVersion2){ this.pageVersion2 = pageVersion2; }
}
My velocity template:
<!DOCTYPE HTML>
<html>
<head>
<title>Compare Results</title>
<meta name="decorator" content="atl.general" />
#requireResource(com.example.plugin.comparator-plugin:comparator-plugin-resources)
</head>
<body>
<div id="compare-div">
<div id="col1">${pageVersion1}</div>
<div id="col2">${pageVersion2}</div>
</div>
</body>
</html>