diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/view/freemarker/spring.ftl b/spring-webmvc/src/main/resources/org/springframework/web/servlet/view/freemarker/spring.ftl
index 00ef2e122da..418dda1ebb7 100644
--- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/view/freemarker/spring.ftl
+++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/view/freemarker/spring.ftl
@@ -1,4 +1,4 @@
-<#ftl strip_whitespace=true>
+<#ftl output_format="HTML" strip_whitespace=true>
<#--
* spring.ftl
*
@@ -157,7 +157,7 @@
-->
<#macro formInput path attributes="" fieldType="text">
<@bind path/>
- ${stringStatusValue}#if>" ${attributes}<@closeTag/>
+ ${stringStatusValue}#if>" ${attributes?no_esc}<@closeTag/>
#macro>
<#--
@@ -202,7 +202,7 @@
-->
<#macro formTextarea path attributes="">
<@bind path/>
-
-->
<#macro formSingleSelect path options attributes="">
<@bind path/>
-