File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed 
spring-webmvc/src/main/java/org/springframework/web/servlet/support Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,8 @@ else if (localeResolver != null) {
265265		// context-param in web.xml, if any. 
266266		this .defaultHtmlEscape  = WebUtils .getDefaultHtmlEscape (this .webApplicationContext .getServletContext ());
267267
268+ 		// Determine response-encoded HTML escape setting from the "responseEncodedHtmlEscape" 
269+ 		// context-param in web.xml, if any. 
268270		this .responseEncodedHtmlEscape  = WebUtils .getResponseEncodedHtmlEscape (this .webApplicationContext .getServletContext ());
269271
270272		this .urlPathHelper  = new  UrlPathHelper ();
@@ -491,11 +493,11 @@ public Boolean getDefaultHtmlEscape() {
491493	/** 
492494	 * Is HTML escaping using the response encoding by default? 
493495	 * If enabled, only XML markup significant characters will be escaped with UTF-* encodings. 
494- 	 * <p>Falls back to {@code false } in case of no explicit default given. 
496+ 	 * <p>Falls back to {@code true } in case of no explicit default given, as of Spring 4.2 . 
495497	 * @since 4.1.2 
496498	 */ 
497499	public  boolean  isResponseEncodedHtmlEscape () {
498- 		return  (this .responseEncodedHtmlEscape  !=  null  &&  this .responseEncodedHtmlEscape .booleanValue ());
500+ 		return  (this .responseEncodedHtmlEscape  ==  null  ||  this .responseEncodedHtmlEscape .booleanValue ());
499501	}
500502
501503	/** 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments