casid / jte

Secure and speedy templates for Java and Kotlin.
https://jte.gg
Apache License 2.0
737 stars 54 forks source link

fix-escaping-double-quotes #330

Closed mhdeeb closed 5 months ago

mhdeeb commented 5 months ago

Previous version fails${"\\\"\\"}. This fix accounts for that.

mhdeeb commented 5 months ago

Apologies, I should have added that change to the other PR but this is the first time I PR so I didn't think about it.

casid commented 5 months ago

Good catch, nice!

One minor thing. Could you please leave the other test as is and add your test as a second one? I think it would be good to test both cases.

codecov[bot] commented 5 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ceaa1d2) 91.22% compared to head (6b768a8) 91.17%.

Files Patch % Lines
.../src/main/java/gg/jte/compiler/TemplateParser.java 83.33% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #330 +/- ## ============================================ - Coverage 91.22% 91.17% -0.05% Complexity 1213 1213 ============================================ Files 76 76 Lines 3155 3160 +5 Branches 488 490 +2 ============================================ + Hits 2878 2881 +3 - Misses 165 167 +2 Partials 112 112 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mhdeeb commented 5 months ago

Sure, although I think the new test accounts for both if I am not mistaken.

mhdeeb commented 5 months ago

Done!

casid commented 5 months ago

Thank you!