Add newline at the beginning of textarea JSP tags
This commit adds a newline char at the beginning of textarea tags values. As per the HTML 4.01 spec (and browsers behavior), a line break following a start tag is ignored. This can lead to Spring's textarea tag to ignore a line break char at the beginning of a tag value. See https://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks Issue: SPR-13503
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -98,7 +98,7 @@ public class TextareaTag extends AbstractHtmlInputElementTag {
|
||||
writeOptionalAttribute(tagWriter, COLS_ATTRIBUTE, getCols());
|
||||
writeOptionalAttribute(tagWriter, ONSELECT_ATTRIBUTE, getOnselect());
|
||||
String value = getDisplayString(getBoundValue(), getPropertyEditor());
|
||||
tagWriter.appendValue(processFieldValue(getName(), value, "textarea"));
|
||||
tagWriter.appendValue("\r\n" + processFieldValue(getName(), value, "textarea"));
|
||||
tagWriter.endTag();
|
||||
return SKIP_BODY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user