http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
index be987f9..983c05d 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfiguration.java
@@ -22,8 +22,11 @@ import java.io.Writer;
 import java.nio.charset.Charset;
 
 import org.apache.freemarker.core.arithmetic.ArithmeticEngine;
+import org.apache.freemarker.core.model.TemplateMarkupOutputModel;
+import org.apache.freemarker.core.outputformat.MarkupOutputFormat;
 import org.apache.freemarker.core.outputformat.OutputFormat;
 import org.apache.freemarker.core.outputformat.impl.HTMLOutputFormat;
+import org.apache.freemarker.core.outputformat.impl.PlainTextOutputFormat;
 import org.apache.freemarker.core.outputformat.impl.UndefinedOutputFormat;
 import org.apache.freemarker.core.outputformat.impl.XMLOutputFormat;
 
@@ -38,51 +41,22 @@ import 
org.apache.freemarker.core.outputformat.impl.XMLOutputFormat;
 public interface ParsingConfiguration {
 
     /**
-     * The template language used; this is often overridden for certain file 
extension with the
+     * The template language used; this is often overridden for certain file 
extensions with
+     * {@link #getRecognizeStandardFileExtensions()} and/or
      * {@link Configuration#getTemplateConfigurations() 
templateConfigurations} setting of the {@link Configuration}.
+     * 
+     * <p>If a {@link TemplateLanguage} specifies a non-{@code null}
+     * {@link TemplateLanguage#getOutputFormat(Configuration) outputFormat}, 
or a non-{@code null}
+     * {@link TemplateLanguage#getAutoEscapingPolicy() autoEscapingPolicy}, 
that overrides the value of
+     * the {@linkplain #getOutputFormat() outputFormat} and {@link 
#getAutoEscapingPolicy() autoEscapingPolicy}
+     * settings that are coming from {@link 
Configuration#getTemplateConfigurations templateConfigurations}, from the
+     * {@link Configuration}, or from any other {@link ParsingConfiguration}.
+     * 
+     * @see ParsingConfiguration#getRecognizeStandardFileExtensions()
      */
     TemplateLanguage getTemplateLanguage();
 
     boolean isTemplateLanguageSet();
-
-    /**
-     * Determines the syntax of the template files (angle bracket VS square 
bracket)
-     * that has no {@code #ftl} in it.  Don't confuse this with the 
interpolation syntax
-     * ({@link #getInterpolationSyntax()}); they are independent.
-     * 
-     * <p>The {@code tagSyntax} parameter must be one of:
-     * <ul>
-     *   <li>{@link TagSyntax#ANGLE_BRACKET}:
-     *     Use the angle bracket tag syntax (the normal syntax), like {@code 
<#include ...>}. This is the default.
-     *   <li>{@link TagSyntax#SQUARE_BRACKET}:
-     *     Use the square bracket tag syntax, like {@code [#include ...]}. 
Note that this does <em>not</em> change
-     *     <code>${x}</code> to {@code [=...]}; that's <em>interpolation</em> 
syntax, so there the relevant one is
-     *     {@link #getInterpolationSyntax()}.
-     * </ul>
-     *
-     * <p>This setting is ignored for the templates that have {@code ftl} 
directive in
-     * it. For those templates the syntax used for the {@code ftl} directive 
determines
-     * the syntax.
-     */
-    TagSyntax getTagSyntax();
-
-    /**
-     * Tells if this setting is set directly in this object. If not, then 
depending on the implementing class, reading
-     * the setting might returns a default value, or returns the value of the 
setting from a parent parsing
-     * configuration or throws a {@link CoreSettingValueNotSetException}.
-     */
-    boolean isTagSyntaxSet();
-    
-    
-    /**
-     * Determines the interpolation syntax (<code>${x}</code> VS 
<code>[=x]</code>) of the template files.
-     * Don't confuse this with the tag syntax ({@link #getTagSyntax()}); they 
are independent.
-     * Note that {@link InterpolationSyntax#SQUARE_BRACKET} does <em>not</em> 
change {@code <#if x>} to
-     * {@code [#if x]}; that's <em>tag</em> syntax, so there the relevant one 
is {@link #getTagSyntax()}.
-     */
-    InterpolationSyntax getInterpolationSyntax();
-
-    boolean isInterpolationSyntaxSet();
     
     /**
      * Whether the template parser will try to remove superfluous white-space 
around certain tags.
@@ -110,7 +84,51 @@ public interface ParsingConfiguration {
     boolean isArithmeticEngineSet();
 
     /**
-     * See {@link Configuration#getAutoEscapingPolicy()}.
+     * Specifies when auto-escaping should be enabled depending on the current 
{@linkplain OutputFormat output format};
+     * default is {@link AutoEscapingPolicy#ENABLE_IF_DEFAULT}. It's important 
to know that the
+     * {@link #getTemplateLanguage() templateLanguage} setting will override 
this, if the {@link TemplateLanguage}
+     * specifies a non-{@code null} {@link 
TemplateLanguage#getAutoEscapingPolicy() autoEscapingPolicy}.
+     * 
+     * <p>Note that the default output format, {@link UndefinedOutputFormat}, 
is a non-escaping format, so there
+     * auto-escaping will be off. For most templates that's no used though, as 
the standard file extensions will set
+     * a {@link TemplateLanguage} that uses a different {@link OutputFormat}.
+     * 
+     * <p>Note that the templates can turn auto-escaping on/off locally with 
directives like
+     * {@code <#ftl auto_esc=...>}, {@code <#autoEsc>...</#autoEsc>}, and 
{@code <#noAutoEsc>...</#noAutoEsc>}, which
+     * are ignoring the auto-escaping policy.
+     *
+     * <p><b>About auto-escaping</b></p>
+     *
+     * <p>
+     * Auto-escaping has significance when a value is printed with 
<code>${...}</code>. If
+     * auto-escaping is on, FreeMarker will assume that the value is plain 
text (as opposed to markup or some kind of
+     * rich text), so it will escape it according the current output format 
(see {@link #getOutputFormat()}
+     * and {@link 
TemplateConfiguration.Builder#setOutputFormat(OutputFormat)}). If auto-escaping 
is off, FreeMarker
+     * will assume that the string value is already in the output format, so 
it prints it as is to the output.
+     *
+     * <p>Further notes on auto-escaping:
+     * <ul>
+     *   <li>When printing numbers, dates, and other kind of non-string values 
with <code>${...}</code>, they will be
+     *       first converted to string (according the formatting settings and 
locale), then they are escaped just like
+     *       string values.
+     *   <li>When printing {@link TemplateMarkupOutputModel}-s, they aren't 
escaped again (they are already escaped).
+     *   <li>Auto-escaping doesn't do anything if the current output format 
isn't an {@link MarkupOutputFormat}.
+     *       That's the case for the default output format, {@link 
UndefinedOutputFormat}, and also for
+     *       {@link PlainTextOutputFormat}.
+     *   <li>The output format inside a string literal expression is always 
{@link PlainTextOutputFormat}
+     *       (regardless of the output format of the containing template), 
which is a non-escaping format. Thus for
+     *       example, with <code>&lt;#assign s = "foo${bar}"&gt;</code>, 
{@code bar} will always get into {@code s}
+     *       without escaping, but with <code>&lt;#assign 
s&gt;foo${bar}&lt;#assign&gt;</code> it may will be escaped.
+     * </ul>
+     *
+     * <p>Note that what you set here is just a default, which can be 
overridden for individual templates with the
+     * {@linkplain Configuration#getTemplateConfigurations() template 
configurations setting}. This setting is also
+     * overridden by the standard file extensions; see them at {@link 
#getRecognizeStandardFileExtensions()}.
+     *
+     * @see Configuration.Builder#setAutoEscapingPolicy(AutoEscapingPolicy)
+     * @see 
TemplateConfiguration.Builder#setAutoEscapingPolicy(AutoEscapingPolicy)
+     * @see Configuration.Builder#setOutputFormat(OutputFormat)
+     * @see TemplateConfiguration.Builder#setOutputFormat(OutputFormat)
      */
     AutoEscapingPolicy getAutoEscapingPolicy();
 
@@ -123,12 +141,16 @@ public interface ParsingConfiguration {
 
     /**
      * The output format to use, which among others influences auto-escaping 
(see {@link #getAutoEscapingPolicy}
-     * autoEscapingPolicy}), and possibly the MIME type of the output.
+     * autoEscapingPolicy}), and possibly the MIME type of the output. It's 
important to know that the
+     * {@link #getTemplateLanguage() templateLanguage} setting will override 
this, if the
+     * {@link TemplateLanguage} specifies a non-{@code null}
+     * {@link TemplateLanguage#getOutputFormat(Configuration) outputFormat} 
(and most languages do).
      * <p>
      * On the {@link Configuration} level, usually, you should leave this on 
its default, which is
-     * {@link UndefinedOutputFormat#INSTANCE}, and then use standard file 
extensions like "ftlh" (for HTML) or "ftlx"
-     * (for XML) (and ensure that {@link #getRecognizeStandardFileExtensions() 
recognizeStandardFileExtensions} is
-     * {@code true}; see more there). Where you can't use the standard 
extensions, templates still can be associated
+     * {@link UndefinedOutputFormat#INSTANCE}, and then use standard file 
extensions like "f3ah" (for HTML) or "f3ax"
+     * (for XML) will set the {@link TemplateLanguage} and hence the output 
format as well (assuming that
+     * {@link #getRecognizeStandardFileExtensions() 
recognizeStandardFileExtensions} is on its default, {@code true}).
+     * Where you can't use the standard extensions, templates still can be 
associated
      * to output formats with patterns matching their name (their path) using 
the
      * {@link Configuration#getTemplateConfigurations() 
templateConfigurations} setting of the {@link Configuration}.
      * But if all templates will have the same output format, you may set the
@@ -152,28 +174,46 @@ public interface ParsingConfiguration {
     boolean isOutputFormatSet();
 
     /**
-     * Tells if the "file" extension part of the source name ({@link 
Template#getSourceName()}) will influence certain
-     * parsing settings. Defaults to {@code true}. When {@code true}, the 
following standard file extensions take
-     * their effect:
+     * Tells if the "file" extension part of the source name ({@link 
Template#getSourceName()}) will set the
+     * {@linkplain #getTemplateLanguage() template language setting}, when the 
file extension matches
+     * the {@link TemplateLanguage#getFileExtension()} of the {@link 
TemplateLanguage}-s known by the
+     * {@link Configuration}. Defaults to {@code true} This overrides the 
{@link TemplateLanguage} coming from
+     * {@link Configuration#getTemplateConfigurations templateConfigurations}, 
from the {@link Configuration}, or from
+     * any other {@link ParsingConfiguration}.
+     * 
+     * <p>As of this writing (2018-04-11; TODO [FM3] ensure this is up to 
date), the standard extensons are
+     * {@code f3ah}, {@code f3ax}, {@code f3au}, {@code f3ac},
+     * {@code f3sh}, {@code f3sx}, {@code f3su}, {@code f3sc},
+     * {@code f3uu}.
+     * 
+     * <p>The part after "f3" but before the last letter of the file extension 
specifies the syntax of the template:
+     * <ul>
+     *   <li>"a": {@link DefaultTemplateLanguage} where {@link 
DefaultTemplateLanguage#getTagSyntax()}
+     *       is {@link TagSyntax#ANGLE_BRACKET} and {@link 
DefaultTemplateLanguage#getInterpolationSyntax()} is
+     *       {@link InterpolationSyntax#DOLLAR}. 
+     *   <li>"s": {@link DefaultTemplateLanguage} where {@link 
DefaultTemplateLanguage#getTagSyntax()}
+     *       is {@link TagSyntax#SQUARE_BRACKET} and {@link 
DefaultTemplateLanguage#getInterpolationSyntax()} is also
+     *       {@link InterpolationSyntax#SQUARE_BRACKET}. 
+     * </ul>
      *
+     * <p>The last letter of the file extension specifies the {@link 
OutputFormat} and the {@link AutoEscapingPolicy}
+     * used by the template:
      * <ul>
-     *   <li>{@code ftlh}: Sets the {@link #getOutputFormat() outputFormat} 
setting to {@code "HTML"}
-     *       (i.e., {@link HTMLOutputFormat#INSTANCE}, unless the {@code 
"HTML"} name is overridden by
-     *       the {@link Configuration#getRegisteredCustomOutputFormats 
registeredOutputFormats} setting) and
-     *       the {@link #getAutoEscapingPolicy() autoEscapingPolicy} setting to
+     *   <li>"h": {@code "HTML"} (i.e., {@link HTMLOutputFormat#INSTANCE}, 
unless the {@code "HTML"} name is overridden
+     *       by the {@link Configuration#getRegisteredCustomOutputFormats 
registeredOutputFormats} setting) and
+     *       the {@link #getAutoEscapingPolicy() autoEscapingPolicy} will be
      *       {@link AutoEscapingPolicy#ENABLE_IF_DEFAULT}.
-     *   <li>{@code ftlx}: Sets the {@link #getOutputFormat() outputFormat} 
setting to
-     *       {@code "XML"} (i.e., {@link XMLOutputFormat#INSTANCE}, unless the 
{@code "XML"} name is overridden by
+     *   <li>"x": {@code "XML"} (i.e., {@link XMLOutputFormat#INSTANCE}, 
unless the {@code "XML"} name is overridden by
      *       the {@link Configuration#getRegisteredCustomOutputFormats 
registeredOutputFormats} setting) and
-     *       the {@link #getAutoEscapingPolicy() autoEscapingPolicy} setting to
+     *       the {@link #getAutoEscapingPolicy() autoEscapingPolicy} will be
      *       {@link AutoEscapingPolicy#ENABLE_IF_DEFAULT}.
-     * </ul>
-     *
-     * <p>These file extensions are not case sensitive. The file extension is 
the part after the last dot in the source
-     * name. If the source name contains no dot, then it has no file extension.
-     *
-     * <p>The settings activated by these file extensions override the setting 
values dictated by the
-     * {@link Configuration#getTemplateConfigurations templateConfigurations} 
setting of the {@link Configuration}.
+      *   <li>"u": {@code "undefined"} (i.e., {@link 
UndefinedOutputFormat#INSTANCE}, unless the {@code "undefined"}
+      *      name is overridden by the {@link 
Configuration#getRegisteredCustomOutputFormats registeredOutputFormats}
+      *      setting) and the {@link #getAutoEscapingPolicy() 
autoEscapingPolicy} will be
+     *       {@link AutoEscapingPolicy#ENABLE_IF_DEFAULT}.
+      *   <li>"c": The output format comes from the "configuration", i.e., 
from {@link #getOutputFormat()}, also the
+     *       auto escaping policy comes from {@link #getAutoEscapingPolicy()}.
+    * </ul>
      */
     // TODO [FM3] If we will support user-defined languages, then this won't 
be "Standard" after all.
     boolean getRecognizeStandardFileExtensions();

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
index 2acd816..3704d0b 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithFallback.java
@@ -48,26 +48,6 @@ final class ParsingConfigurationWithFallback implements 
ParsingConfiguration {
     }
 
     @Override
-    public TagSyntax getTagSyntax() {
-        return tCfg.isTagSyntaxSet() ? tCfg.getTagSyntax() : 
cfg.getTagSyntax();
-    }
-
-    @Override
-    public boolean isTagSyntaxSet() {
-        return true;
-    }
-
-    @Override
-    public InterpolationSyntax getInterpolationSyntax() {
-        return tCfg.isInterpolationSyntaxSet() ? tCfg.getInterpolationSyntax() 
: cfg.getInterpolationSyntax();
-    }
-
-    @Override
-    public boolean isInterpolationSyntaxSet() {
-        return true;
-    }
-    
-    @Override
     public boolean getWhitespaceStripping() {
         return tCfg.isWhitespaceStrippingSet() ? tCfg.getWhitespaceStripping() 
: cfg.getWhitespaceStripping();
     }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithTemplateLanguageOverride.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithTemplateLanguageOverride.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithTemplateLanguageOverride.java
index a2bcc1b..b6b3c09 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithTemplateLanguageOverride.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/ParsingConfigurationWithTemplateLanguageOverride.java
@@ -49,26 +49,6 @@ final class ParsingConfigurationWithTemplateLanguageOverride 
implements ParsingC
     }
 
     @Override
-    public TagSyntax getTagSyntax() {
-        return pCfg.getTagSyntax();
-    }
-
-    @Override
-    public boolean isTagSyntaxSet() {
-        return pCfg.isTagSyntaxSet();
-    }
-
-    @Override
-    public InterpolationSyntax getInterpolationSyntax() {
-        return pCfg.getInterpolationSyntax();
-    }
-
-    @Override
-    public boolean isInterpolationSyntaxSet() {
-        return pCfg.isInterpolationSyntaxSet();
-    }
-
-    @Override
     public boolean getWhitespaceStripping() {
         return pCfg.getWhitespaceStripping();
     }
@@ -148,7 +128,4 @@ final class 
ParsingConfigurationWithTemplateLanguageOverride implements ParsingC
         return pCfg.isSourceEncodingSet();
     }
     
-    
-    
-    
 }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/TagSyntax.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/TagSyntax.java 
b/freemarker-core/src/main/java/org/apache/freemarker/core/TagSyntax.java
index 776c64c..91eb750 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/TagSyntax.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/TagSyntax.java
@@ -20,7 +20,7 @@
 package org.apache.freemarker.core;
 
 /**
- * Used as the value of the {@link ParsingConfiguration#getTagSyntax()}  
tagSyntax} setting.
+ * Used as the value of the {@link DefaultTemplateLanguage#getTagSyntax()}  
tagSyntax} setting.
  */
 public enum TagSyntax {
     

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java 
b/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
index 5aa21bf..283f901 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/Template.java
@@ -65,7 +65,6 @@ import 
org.apache.freemarker.core.valueformat.TemplateNumberFormatFactory;
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
- * <p>
  * Stores an already parsed template, ready to be processed (rendered) for 
unlimited times, possibly from multiple
  * threads.
  * <p>
@@ -432,7 +431,6 @@ public class Template implements ProcessingConfiguration, 
CustomStateScope {
                     }
                     rootElement = null;
                 }
-                interpolationSyntax = pCfg.getInterpolationSyntax();
             } catch (TokenMgrError exc) {
                 // TokenMgrError VS ParseException is not an interesting 
difference for the user, so we just convert it
                 // to ParseException
@@ -788,28 +786,6 @@ public class Template implements ProcessingConfiguration, 
CustomStateScope {
     }
 
     /**
-     * Returns the tag syntax the parser has chosen for this template. If the 
syntax could be determined, it's
-     * {@link TagSyntax#SQUARE_BRACKET} or {@link TagSyntax#ANGLE_BRACKET}. If 
the syntax
-     * couldn't be determined (like because there was no tags in the template, 
or it was a plain text template), this
-     * returns whatever the default is in the current configuration.
-     * 
-     * @see ParsingConfiguration#getTagSyntax()
-     */
-    public TagSyntax getActualTagSyntax() {
-        return actualTagSyntax;
-    }
-    
-    /**
-     * Returns the interpolation syntax the parser has used for this template. 
Because the interpolation syntax is
-     * never auto-detected, it's not called "getActualInterpolationSyntax" 
(unlike {@link #getActualTagSyntax()}).
-     * 
-     * @see ParsingConfiguration#getInterpolationSyntax()
-     */
-    public InterpolationSyntax getInterpolationSyntax() {
-        return interpolationSyntax;
-    }
-    
-    /**
      * Returns the output format (see {@link Configuration#getOutputFormat()}) 
used for this template.
      * The output format of a template can come from various places, in order 
of increasing priority:
      * {@link Configuration#getOutputFormat()}, {@link 
ParsingConfiguration#getOutputFormat()} (which is usually

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
index 34b9d0a..8627059 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateConfiguration.java
@@ -82,8 +82,6 @@ public final class TemplateConfiguration implements 
ParsingAndProcessingConfigur
     private final Map<Serializable, Object> customSettings;
     
     private final TemplateLanguage templateLanguage;
-    private final TagSyntax tagSyntax;
-    private final InterpolationSyntax interpolationSyntax;
     private final Boolean whitespaceStripping;
     private final AutoEscapingPolicy autoEscapingPolicy;
     private final Boolean recognizeStandardFileExtensions;
@@ -124,8 +122,6 @@ public final class TemplateConfiguration implements 
ParsingAndProcessingConfigur
         customSettings = builder.getCustomSettings(false);
 
         templateLanguage = builder.isTemplateLanguageSet() ? 
builder.getTemplateLanguage() : null;
-        tagSyntax = builder.isTagSyntaxSet() ? builder.getTagSyntax() : null;
-        interpolationSyntax = builder.isInterpolationSyntaxSet() ? 
builder.getInterpolationSyntax() : null;
         whitespaceStripping = builder.isWhitespaceStrippingSet() ? 
builder.getWhitespaceStripping() : null;
         autoEscapingPolicy = builder.isAutoEscapingPolicySet() ? 
builder.getAutoEscapingPolicy() : null;
         recognizeStandardFileExtensions = 
builder.isRecognizeStandardFileExtensionsSet() ? 
builder.getRecognizeStandardFileExtensions() : null;
@@ -135,32 +131,6 @@ public final class TemplateConfiguration implements 
ParsingAndProcessingConfigur
     }
 
     @Override
-    public TagSyntax getTagSyntax() {
-        if (!isTagSyntaxSet()) {
-            throw new CoreSettingValueNotSetException("tagSyntax");
-        }
-        return tagSyntax;
-    }
-    
-    @Override
-    public boolean isTagSyntaxSet() {
-        return tagSyntax != null;
-    }
-
-    @Override
-    public InterpolationSyntax getInterpolationSyntax() {
-        if (!isInterpolationSyntaxSet()) {
-            throw new CoreSettingValueNotSetException("interpolationSyntax");
-        }
-        return interpolationSyntax;
-    }
-
-    @Override
-    public boolean isInterpolationSyntaxSet() {
-        return interpolationSyntax != null;
-    }
-    
-    @Override
     public TemplateLanguage getTemplateLanguage() {
         if (!isTemplateLanguageSet()) {
             throw new CoreSettingValueNotSetException("templateLanguage");
@@ -837,12 +807,6 @@ public final class TemplateConfiguration implements 
ParsingAndProcessingConfigur
             if (tc.isSQLDateAndTimeTimeZoneSet()) {
                 setSQLDateAndTimeTimeZone(tc.getSQLDateAndTimeTimeZone());
             }
-            if (tc.isTagSyntaxSet()) {
-                setTagSyntax(tc.getTagSyntax());
-            }
-            if (tc.isInterpolationSyntaxSet()) {
-                setInterpolationSyntax(tc.getInterpolationSyntax());
-            }
             if (tc.isTemplateLanguageSet()) {
                 setTemplateLanguage(tc.getTemplateLanguage());
             }
@@ -905,16 +869,6 @@ public final class TemplateConfiguration implements 
ParsingAndProcessingConfigur
         }
 
         @Override
-        protected TagSyntax getDefaultTagSyntax() {
-            throw new CoreSettingValueNotSetException("tagSyntax");
-        }
-        
-        @Override
-        protected InterpolationSyntax getDefaultInterpolationSyntax() {
-            throw new CoreSettingValueNotSetException("interpolationSyntax");
-        }
-
-        @Override
         protected TemplateLanguage getDefaultTemplateLanguage() {
             throw new CoreSettingValueNotSetException("templateLanguage");
         }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateLanguage.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateLanguage.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateLanguage.java
index 0694050..08949b4 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateLanguage.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/TemplateLanguage.java
@@ -29,8 +29,18 @@ import 
org.apache.freemarker.core.util._NullArgumentException;
 import org.apache.freemarker.core.util._StringUtils;
 
 /**
- * Represents a template language. Currently this class is not mature, so it 
can't be implemented outside FreeMarker,
- * also its methods shouldn't be called from outside FreeMarker.
+ * Represents a template language; a template language specifies the syntax, 
and usually also the {@link OutputFormat}
+ * and {@link AutoEscapingPolicy} of the template. In the future (TODO [FM3]) 
custom template languages may also
+ * specify the dialect (which is the set of core directives and functions).  
+ * 
+ * <p><em>Currently this class is not mature, so it can't be implemented 
outside FreeMarker,
+ * also its methods shouldn't be called from outside FreeMarker.</em>
+ * 
+ * The default list of available templates contains all the final constants 
from {@link DefaultTemplateLanguage}, and
+ * {@link UnparsedTemplateLanguage}.
+ * 
+ * @see ParsingConfiguration#getTemplateLanguage()
+ * @see ParsingConfiguration#getRecognizeStandardFileExtensions()
  */
 // [TODO][FM3] Make this mature, or hide its API somehow, or at least prevent 
subclassing it by user.
 public abstract class TemplateLanguage {
@@ -65,7 +75,7 @@ public abstract class TemplateLanguage {
     }
     
     /**
-     * Non-public constructor used for languages defiend by the FreeMarker 
project.
+     * Non-public constructor used for languages defined by the FreeMarker 
project.
      */
     TemplateLanguage(String fileExtension, boolean allowExtensionStartingWithF,
             OutputFormat outputFormat, AutoEscapingPolicy autoEscapingPolicy) {
@@ -100,7 +110,7 @@ public abstract class TemplateLanguage {
             throws IOException, ParseException;
 
     /**
-     * The file extension that should be used for this language. Not {@code 
null}. It can't contain upper-case letters,
+     * The file extension that should be used for this language; not {@code 
null}. It can't contain upper-case letters,
      * nor dot. It can't start with "f", unless it's defined by the FreeMarker 
project itself. 
      */
     public String getFileExtension() {

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/java/org/apache/freemarker/core/_ErrorDescriptionBuilder.java
----------------------------------------------------------------------
diff --git 
a/freemarker-core/src/main/java/org/apache/freemarker/core/_ErrorDescriptionBuilder.java
 
b/freemarker-core/src/main/java/org/apache/freemarker/core/_ErrorDescriptionBuilder.java
index 48a48fc..7d96e3d 100644
--- 
a/freemarker-core/src/main/java/org/apache/freemarker/core/_ErrorDescriptionBuilder.java
+++ 
b/freemarker-core/src/main/java/org/apache/freemarker/core/_ErrorDescriptionBuilder.java
@@ -229,7 +229,10 @@ public class _ErrorDescriptionBuilder {
                                     || (partStr.charAt(1) == '/') && 
(partStr.charAt(2) == '#' || partStr.charAt(2) == '@')
                             )
                             && partStr.charAt(partStr.length() - 1) == '>') {
-                        if (template.getActualTagSyntax() == 
TagSyntax.SQUARE_BRACKET) {
+                        TemplateLanguage tempLang = 
template.getParsingConfiguration().getTemplateLanguage();
+                        // TODO [FM3] We shouldn't assume 
DefaultTemplateLanguage
+                        if (tempLang instanceof DefaultTemplateLanguage
+                                && ((DefaultTemplateLanguage) 
tempLang).getTagSyntax() == TagSyntax.SQUARE_BRACKET) {
                             sb.append('[');
                             sb.append(partStr.substring(1, partStr.length() - 
1));
                             sb.append(']');

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-core/src/main/javacc/FTL.jj
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/javacc/FTL.jj 
b/freemarker-core/src/main/javacc/FTL.jj
index 690144a..d4697b3 100644
--- a/freemarker-core/src/main/javacc/FTL.jj
+++ b/freemarker-core/src/main/javacc/FTL.jj
@@ -83,6 +83,7 @@ public class FMParser {
     private AutoEscapingPolicy autoEscapingPolicy;
     private boolean autoEscaping;
     private ParsingConfiguration pCfg;
+    DefaultTemplateLanguage templateLanguage;
     private InputStream streamToUnmarkWhenEncEstabd;
 
     /** Keeps track of #list nesting. */
@@ -143,7 +144,7 @@ public class FMParser {
         token_source.incompatibleImprovements = incompatibleImprovements;
         this.incompatibleImprovements = incompatibleImprovements;
 
-        DefaultTemplateLanguage templateLanguage = (DefaultTemplateLanguage) 
pCfg.getTemplateLanguage();
+        templateLanguage = (DefaultTemplateLanguage) 
pCfg.getTemplateLanguage();
 
         {
             // contextXxx is stronger than anything.
@@ -165,15 +166,7 @@ public class FMParser {
 
         token_source.setParser(this);
 
-        TagSyntax tagSyntax;
-        {
-            TagSyntax tagSyntaxFromLang;
-            tagSyntax
-                    = (tagSyntaxFromLang = templateLanguage.getTagSyntax()) != 
null
-                                   ? tagSyntaxFromLang
-                                   : pCfg.getTagSyntax();
-        }
-        switch (tagSyntax) {
+        switch (templateLanguage.getTagSyntax()) {
         case ANGLE_BRACKET:
             token_source.squBracTagSyntax = false;
             break;
@@ -181,16 +174,10 @@ public class FMParser {
             token_source.squBracTagSyntax = true;
             break;
         default:
-            throw new BugException("Unsupported tagSyntax: " + tagSyntax);
+            throw new BugException();
         }
 
-        {
-            InterpolationSyntax interpolationSyntaxFromLang;
-            token_source.interpolationSyntax
-                    = (interpolationSyntaxFromLang = 
templateLanguage.getInterpolationSyntax()) != null
-                                   ? interpolationSyntaxFromLang
-                                   : pCfg.getInterpolationSyntax();
-        }
+        token_source.interpolationSyntax = 
templateLanguage.getInterpolationSyntax();
 
         this.stripWhitespace = pCfg.getWhitespaceStripping();
 
@@ -2210,7 +2197,7 @@ ASTExpStringLiteral StringLiteral(boolean interpolate) :
         result.setLocation(template, t, t);
         if (interpolate && !raw) {
             // TODO [FM3]: This logic is broken. It can't handle literals that 
contains both ${...} and $\{...}. 
-            InterpolationSyntax intSyn = pCfg.getInterpolationSyntax();
+            InterpolationSyntax intSyn = 
templateLanguage.getInterpolationSyntax();
             if (intSyn == InterpolationSyntax.DOLLAR && t.image.indexOf("${") 
!= -1
                     || intSyn == InterpolationSyntax.SQUARE_BRACKET && 
t.image.indexOf("[=") != -1) {
                 result.parseValue(token_source, outputFormat);

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample.java
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample.java
 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample.java
index 2a1dcc3..d64b36b 100644
--- 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample.java
+++ 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample.java
@@ -36,7 +36,7 @@ public class AbsoluteTemplateNameBIExample extends 
TemplateTest {
 
     @Test
     public void test() throws Exception {
-        assertOutputForNamed("dir/AbsoluteTemplateNameBIExample-main.ftl");
+        assertOutputForNamed("dir/AbsoluteTemplateNameBIExample-main.f3ah");
     }
     
 }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AutoEscapingExample.java
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AutoEscapingExample.java
 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AutoEscapingExample.java
index f872e41..0718626 100644
--- 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AutoEscapingExample.java
+++ 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/AutoEscapingExample.java
@@ -27,42 +27,42 @@ public class AutoEscapingExample extends TemplateTest {
 
     @Test
     public void testInfoBox() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-infoBox.ftlh");
+        assertOutputForNamed("AutoEscapingExample-infoBox.f3ah");
     }
 
     @Test
     public void testCapture() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-capture.ftlh");
+        assertOutputForNamed("AutoEscapingExample-capture.f3ah");
     }
 
     @Test
     public void testMarkup() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-markup.ftlh");
+        assertOutputForNamed("AutoEscapingExample-markup.f3ah");
     }
 
     @Test
     public void testConvert() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-convert.ftlh");
+        assertOutputForNamed("AutoEscapingExample-convert.f3ah");
     }
 
     @Test
     public void testConvert2() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-convert2.ftl");
+        assertOutputForNamed("AutoEscapingExample-convert2.f3au");
     }
 
     @Test
     public void testStringLiteral() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-stringLiteral.ftlh");
+        assertOutputForNamed("AutoEscapingExample-stringLiteral.f3ah");
     }
 
     @Test
     public void testStringLiteral2() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-stringLiteral2.ftlh");
+        assertOutputForNamed("AutoEscapingExample-stringLiteral2.f3ah");
     }
 
     @Test
     public void testStringConcat() throws Exception {
-        assertOutputForNamed("AutoEscapingExample-stringConcat.ftlh");
+        assertOutputForNamed("AutoEscapingExample-stringConcat.f3ah");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/CustomFormatsExample.java
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/CustomFormatsExample.java
 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/CustomFormatsExample.java
index afa2185..1e38cdb 100644
--- 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/CustomFormatsExample.java
+++ 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/CustomFormatsExample.java
@@ -53,7 +53,7 @@ public class CustomFormatsExample extends TemplateTest {
         addToDataModel("fd", new Date(1450904944213L));
         addToDataModel("let", new Date(1450904944213L));
         
-        assertOutputForNamed("CustomFormatsExample-alias1.ftlh");
+        assertOutputForNamed("CustomFormatsExample-alias1.f3ah");
     }
 
     @Test
@@ -64,7 +64,7 @@ public class CustomFormatsExample extends TemplateTest {
                         "oct", new AliasTemplateNumberFormatFactory("@base 
8")))
                 .build());
 
-        assertOutputForNamed("CustomFormatsExample-alias2.ftlh");
+        assertOutputForNamed("CustomFormatsExample-alias2.f3ah");
     }
 
     @Test
@@ -77,7 +77,7 @@ public class CustomFormatsExample extends TemplateTest {
 
         addToDataModel("weight", new UnitAwareTemplateNumberModel(1.5, "kg"));
         
-        assertOutputForNamed("CustomFormatsExample-modelAware.ftlh");
+        assertOutputForNamed("CustomFormatsExample-modelAware.f3ah");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/GettingStartedExample.java
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/GettingStartedExample.java
 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/GettingStartedExample.java
index a3e1107..e194edb 100644
--- 
a/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/GettingStartedExample.java
+++ 
b/freemarker-manual/src/test/java/org/apache/freemarker/manual/examples/GettingStartedExample.java
@@ -53,7 +53,7 @@ public class GettingStartedExample {
         root.put("latestProduct", latest);
 
         /* Get the template (uses cache internally) */
-        Template temp = cfg.getTemplate("test.ftlh");
+        Template temp = cfg.getTemplate("test.f3ah");
 
         /* Merge data-model with template */
         Writer out = new OutputStreamWriter(System.out);

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.f3ah
new file mode 100644
index 0000000..b588cb3
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.f3ah
@@ -0,0 +1,19 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+/foo

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.ftl
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.ftl
deleted file mode 100644
index b588cb3..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-foo.ftl
+++ /dev/null
@@ -1,19 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-/foo

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.f3ah
new file mode 100644
index 0000000..13d724b
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.f3ah
@@ -0,0 +1,38 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#--
+  <@smileyInclude name /> behaves like <#include name>, but prints a "(:" 
before the
+  template, or prints "):" instead if the template is missing.
+
+  Note that just like with #include, if name is relative, it's resolved based 
on the
+  directory of the caller template, not of the template that defines this 
macro. As
+  .get_optional_template resolves relative names based on the current 
template, we
+  had to convert the name to an absolute name based on the caller template 
before
+  passing it to it.
+-->
+<#macro smileyInclude name{positional}>
+  <#local t = .getOptionalTemplate(
+      name?absoluteTemplateName(.callerTemplateName))>
+  <#if t.exists>
+    (:
+    <@t.include />
+  <#else>
+    ):
+  </#if>
+</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.ftl
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.ftl
deleted file mode 100644
index 13d724b..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AbsoluteTemplateNameBIExample-lib.ftl
+++ /dev/null
@@ -1,38 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#--
-  <@smileyInclude name /> behaves like <#include name>, but prints a "(:" 
before the
-  template, or prints "):" instead if the template is missing.
-
-  Note that just like with #include, if name is relative, it's resolved based 
on the
-  directory of the caller template, not of the template that defines this 
macro. As
-  .get_optional_template resolves relative names based on the current 
template, we
-  had to convert the name to an absolute name based on the caller template 
before
-  passing it to it.
--->
-<#macro smileyInclude name{positional}>
-  <#local t = .getOptionalTemplate(
-      name?absoluteTemplateName(.callerTemplateName))>
-  <#if t.exists>
-    (:
-    <@t.include />
-  <#else>
-    ):
-  </#if>
-</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah
new file mode 100644
index 0000000..24bd0ee
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah
@@ -0,0 +1,21 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign captured><b>Test</b></#assign>
+Just a string: ${"<b>Test</b>"}
+Captured output: ${captured}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah.out
new file mode 100644
index 0000000..cf0da7e
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.f3ah.out
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+Just a string: &lt;b&gt;Test&lt;/b&gt;
+Captured output: <b>Test</b>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh
deleted file mode 100644
index 24bd0ee..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh
+++ /dev/null
@@ -1,21 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign captured><b>Test</b></#assign>
-Just a string: ${"<b>Test</b>"}
-Captured output: ${captured}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh.out
deleted file mode 100644
index cf0da7e..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-capture.ftlh.out
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-Just a string: &lt;b&gt;Test&lt;/b&gt;
-Captured output: <b>Test</b>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah
new file mode 100644
index 0000000..5d60879
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah
@@ -0,0 +1,27 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign mo1 = "Foo's bar {}"?esc>
+HTLM: ${mo1}
+XML:  <#outputFormat 'XML'>${mo1}</#outputFormat>
+RTF:  <#outputFormat 'RTF'>${mo1}</#outputFormat>
+
+<#assign mo2><p>Test</#assign>
+HTML: ${mo2}
+XML:  <#attempt><#outputFormat 
'XML'>${mo2}</#outputFormat><#recover>Failed</#attempt>
+RTF:  <#attempt><#outputFormat 
'RTF'>${mo2}</#outputFormat><#recover>Failed</#attempt>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah.out
new file mode 100644
index 0000000..65be2a0
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.f3ah.out
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+HTLM: Foo&#39;s bar {}
+XML:  Foo&apos;s bar {}
+RTF:  Foo's bar \{\}
+
+HTML: <p>Test
+XML:  Failed
+RTF:  Failed

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh
deleted file mode 100644
index 5d60879..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh
+++ /dev/null
@@ -1,27 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign mo1 = "Foo's bar {}"?esc>
-HTLM: ${mo1}
-XML:  <#outputFormat 'XML'>${mo1}</#outputFormat>
-RTF:  <#outputFormat 'RTF'>${mo1}</#outputFormat>
-
-<#assign mo2><p>Test</#assign>
-HTML: ${mo2}
-XML:  <#attempt><#outputFormat 
'XML'>${mo2}</#outputFormat><#recover>Failed</#attempt>
-RTF:  <#attempt><#outputFormat 
'RTF'>${mo2}</#outputFormat><#recover>Failed</#attempt>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh.out
deleted file mode 100644
index 65be2a0..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh.out
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-HTLM: Foo&#39;s bar {}
-XML:  Foo&apos;s bar {}
-RTF:  Foo's bar \{\}
-
-HTML: <p>Test
-XML:  Failed
-RTF:  Failed

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au
new file mode 100644
index 0000000..5651bd2
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au
@@ -0,0 +1,25 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#outputFormat "HTML"><#assign htmlMO><p>Test</#assign></#outputFormat>
+<#outputFormat "XML"><#assign xmlMO><p>Test</p></#assign></#outputFormat>
+<#outputFormat "RTF"><#assign rtfMO>\par Test</#assign></#outputFormat>
+<#-- We assume that we have "undefined" output format here. -->
+HTML: ${htmlMO}
+XML:  ${xmlMO}
+RTF:  ${rtfMO}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au.out
new file mode 100644
index 0000000..cd84bd2
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.f3au.out
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+HTML: <p>Test
+XML:  <p>Test</p>
+RTF:  \par Test
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl
deleted file mode 100644
index 5651bd2..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl
+++ /dev/null
@@ -1,25 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#outputFormat "HTML"><#assign htmlMO><p>Test</#assign></#outputFormat>
-<#outputFormat "XML"><#assign xmlMO><p>Test</p></#assign></#outputFormat>
-<#outputFormat "RTF"><#assign rtfMO>\par Test</#assign></#outputFormat>
-<#-- We assume that we have "undefined" output format here. -->
-HTML: ${htmlMO}
-XML:  ${xmlMO}
-RTF:  ${rtfMO}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl.out
deleted file mode 100644
index cd84bd2..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl.out
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-HTML: <p>Test
-XML:  <p>Test</p>
-RTF:  \par Test
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah
new file mode 100644
index 0000000..94423dc
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah
@@ -0,0 +1,26 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<@infoBox "Foo & bar" />
+<@infoBox "Foo <b>bar</b>"?noEsc />
+
+<#macro infoBox message{positional}>
+  <div class="infoBox">
+    ${message}
+  </div>
+</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah.out
new file mode 100644
index 0000000..9471ab7
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.f3ah.out
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+  <div class="infoBox">
+    Foo &amp; bar
+  </div>
+  <div class="infoBox">
+    Foo <b>bar</b>
+  </div>
+

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh
deleted file mode 100644
index 94423dc..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<@infoBox "Foo & bar" />
-<@infoBox "Foo <b>bar</b>"?noEsc />
-
-<#macro infoBox message{positional}>
-  <div class="infoBox">
-    ${message}
-  </div>
-</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh.out
deleted file mode 100644
index 9471ab7..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh.out
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-  <div class="infoBox">
-    Foo &amp; bar
-  </div>
-  <div class="infoBox">
-    Foo <b>bar</b>
-  </div>
-

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah
new file mode 100644
index 0000000..ed1fa6a
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah
@@ -0,0 +1,28 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign markupOutput1="<b>Test</b>"?noEsc>
+<#assign markupOutput2="Foo & bar"?esc>
+
+As expected:
+${markupOutput1}
+${markupOutput2}
+
+Double escaping:
+${markupOutput1?markupString}
+${markupOutput2?markupString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah.out
new file mode 100644
index 0000000..0420cca
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.f3ah.out
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+As expected:
+<b>Test</b>
+Foo &amp; bar
+
+Double escaping:
+&lt;b&gt;Test&lt;/b&gt;
+Foo &amp;amp; bar
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh
deleted file mode 100644
index ed1fa6a..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh
+++ /dev/null
@@ -1,28 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign markupOutput1="<b>Test</b>"?noEsc>
-<#assign markupOutput2="Foo & bar"?esc>
-
-As expected:
-${markupOutput1}
-${markupOutput2}
-
-Double escaping:
-${markupOutput1?markupString}
-${markupOutput2?markupString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh.out
deleted file mode 100644
index 0420cca..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh.out
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-As expected:
-<b>Test</b>
-Foo &amp; bar
-
-Double escaping:
-&lt;b&gt;Test&lt;/b&gt;
-Foo &amp;amp; bar
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah
new file mode 100644
index 0000000..7cf5c13
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah
@@ -0,0 +1,19 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+${"<h1>"?noEsc + "Foo & bar" + "</h1>"?noEsc}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah.out
new file mode 100644
index 0000000..d016072
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.f3ah.out
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+<h1>Foo &amp; bar</h1>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh
deleted file mode 100644
index 7cf5c13..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh
+++ /dev/null
@@ -1,19 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-${"<h1>"?noEsc + "Foo & bar" + "</h1>"?noEsc}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh.out
deleted file mode 100644
index d016072..0000000
--- 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh.out
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-<h1>Foo &amp; bar</h1>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah
new file mode 100644
index 0000000..4904f60
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah
@@ -0,0 +1,21 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign s = "Foo & bar">
+${s}
+${"${s} & baz"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah.out
 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah.out
new file mode 100644
index 0000000..c6bd10d
--- /dev/null
+++ 
b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral.f3ah.out
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+Foo &amp; bar
+Foo &amp; bar &amp; baz
\ No newline at end of file

Reply via email to