Encode based on response character encoding
Before this commit, characters were always encoded with the default encoding (i.e. ISO-8859-1). Now, the character encoding of the response is used. Closes gh-files
This commit is contained in:
@@ -92,7 +92,8 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
|
||||
* as required. This version is <strong>not</strong> {@link PropertyEditor}-aware.
|
||||
*/
|
||||
protected String getDisplayString(@Nullable Object value) {
|
||||
return ValueFormatter.getDisplayString(value, isHtmlEscape());
|
||||
String displayString = ValueFormatter.getDisplayString(value, false);
|
||||
return isHtmlEscape() ? htmlEscape(displayString) : displayString;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,7 +103,8 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
|
||||
* to obtain the display value.
|
||||
*/
|
||||
protected String getDisplayString(@Nullable Object value, @Nullable PropertyEditor propertyEditor) {
|
||||
return ValueFormatter.getDisplayString(value, propertyEditor, isHtmlEscape());
|
||||
String displayString = ValueFormatter.getDisplayString(value, propertyEditor, false);
|
||||
return isHtmlEscape() ? htmlEscape(displayString) : displayString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user