playframework / playframework/play1
Values suddenly returned html encoded in template?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 671
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
Play Version (1.5.x / etc)
1.7.1
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
Windows 11
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
jdk-11.0.15.1
Library Dependencies
db.driver=com.mysql.cj.jdbc.Driver
jpa.dialect=org.hibernate.dialect.MySQL8Dialect
hibernate.temp.use_jdbc_metadata_defaults=false
Expected Behavior
My template fetches temperatures in the database using : ${obj.minTemp}
All values are stored in mysql database as DOUBLES
With play 1.5, for negative temperatures, I would get -15 --> Expected
Actual Behavior
Since upgrading to Play 1.7.1, ${obj.minTemp} returns −15
When calling .raw() I get −15 which is causing the JS to fail since the returned − is not being parsed as -
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the ${obj.minTemp} interpolation with a negative DOUBLE value on Play 1.7.1, comparing normal and .raw() output. The fix is done when negative temperatures render with an ASCII - suitable for JavaScript without breaking the intended template escaping behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100