]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/output/template/OutputVariableCommand.java
Escape template var output.
[gigi.git] / src / org / cacert / gigi / output / template / OutputVariableCommand.java
index f3c424abaff826b3d6200be131accb6991a9ecea..1247891a91b5a305cde48a66343e16bc46b024c2 100644 (file)
@@ -10,12 +10,20 @@ public final class OutputVariableCommand implements Outputable {
 
     private final String raw;
 
+    private final boolean escaped;
+
     public OutputVariableCommand(String raw) {
-        this.raw = raw;
+        if (raw.charAt(0) == '!') {
+            escaped = true;
+            this.raw = raw.substring(1);
+        } else {
+            escaped = true;
+            this.raw = raw;
+        }
     }
 
     @Override
     public void output(PrintWriter out, Language l, Map<String, Object> vars) {
-        Template.outputVar(out, l, vars, raw);
+        Template.outputVar(out, l, vars, raw, escaped);
     }
 }