-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add better error checking for inline html diff code #13239
Add better error checking for inline html diff code #13239
Conversation
A better fix for go-gitea#13191 which cleans up this code a bit and adds basic checking which should avoid writing broken HTML in future situations.
Codecov Report
@@ Coverage Diff @@
## master #13239 +/- ##
==========================================
+ Coverage 42.21% 42.22% +0.01%
==========================================
Files 683 683
Lines 75458 75450 -8
==========================================
+ Hits 31851 31860 +9
+ Misses 38382 38369 -13
+ Partials 5225 5221 -4
Continue to review full report at Codecov.
|
please send backport :) |
* Add better error checking for inline html diff code A better fix for go-gitea#13191 which cleans up this code a bit and adds basic checking which should avoid writing broken HTML in future situations. * Update gitdiff_test.go * better regex Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix error in diff html rendering (#13191) * Fix error in diff html rendering Was missing an optional whitespace check in regex. Also noticed a rare case where diff.Type == Equal would be empty and thus get a newline attached. Fixed that too. Fixes #13177 * Update services/gitdiff/gitdiff.go Co-authored-by: zeripath <art27@cantab.net> * Update gitdiff_test.go * fmt Co-authored-by: zeripath <art27@cantab.net> * Add better error checking for inline html diff code (#13239) * Add better error checking for inline html diff code A better fix for #13191 which cleans up this code a bit and adds basic checking which should avoid writing broken HTML in future situations. * Update gitdiff_test.go * better regex Co-authored-by: zeripath <art27@cantab.net>
Please send backport |
@lafriks already done : ) |
keep the backport label so we know what it was backported to. |
A better fix for #13191 which cleans up this code a bit and adds basic checking which should avoid ever writing broken HTML in future situations.