Skip to content

First new line character is removed when use <form:textarea> tag [SPR-13503] #18081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Sep 24, 2015 · 8 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Kazuki Shimizu opened SPR-13503 and commented

When first character of input value is new line character, <form:textarea> is output the HTML as follow:

e.g.) input value at textarea is "<CRLF>input value"

<textarea id="text" name="text">
input value</textarea>

When render the above HTML on Web Browser(Chrome, Firefox, Safari, IE ...), first new line character is removed from User Interface.
On an Web Browser,"<CRLF>input value" is render same with "input value" (without <CRLF>).

Probably, <form:textarea> tag should be output the HTML as follow:
(Append new line character after <textarea> start tag)

<textarea id="text" name="text">

input value</textarea>

Affects: 4.2.1

Referenced from: commits 311d4c9, 8994498, 9b20231, 44c3212, 2267b14, b88c399

@spring-projects-issues
Copy link
Collaborator Author

Kazuki Shimizu commented

I added the repro project.

@spring-projects-issues
Copy link
Collaborator Author

Kazuki Shimizu commented

Hi Brian Clozel, What status is this issue ?

@spring-projects-issues
Copy link
Collaborator Author

Brian Clozel commented

This fix adds a newline within textarea tags, since it seems to be part of the HTML 4 spec and browsers behavior.

Thanks for this report!

@spring-projects-issues
Copy link
Collaborator Author

Kazuki Shimizu commented

Brian Clozel, Thanks for resolving this.

I will try it using 4.3.0-BUUILD-SUNAPSHOT at later.

@spring-projects-issues
Copy link
Collaborator Author

Kazuki Shimizu commented

Hi Brian Clozel, I think this issue should be resolved on FreeMarker and Velocity macro.

How do you think ?

@spring-projects-issues
Copy link
Collaborator Author

Kazuki Shimizu commented

Hi Brian Clozel , I've submit the Pull Request for FreeMarker and Velocity macro.
See #1014.

@spring-projects-issues
Copy link
Collaborator Author

Brian Clozel commented

Thanks Kazuki Shimizu!
This will be shortly available in the SNAPSHOT versions.

@spring-projects-issues
Copy link
Collaborator Author

Kazuki Shimizu commented

Hi Brian Clozel, I've confirmed that resolved this issue using FreeMarker !!
Thanks.

@spring-projects-issues spring-projects-issues added type: bug A general bug in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.2.6 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants