This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Commit 4e128be
authored
sanitize entire response before parsing comments (#416)
<!-- This is an auto-generated comment: release notes by OSS CodeRabbit
-->
### Summary by CodeRabbit
```
### Bug Fixes:
- Fixed a logic error in the `add` function in `prompts.ts`. The operation has been corrected from subtraction to addition.
- Enhanced security in `review.ts` by sanitizing the entire response before parsing comments.
### Refactor:
- Renamed `sanitizeComment` function to `sanitizeResponse` in `review.ts`, and expanded its functionality to sanitize code blocks for suggestions and diffs.
### Removed:
- Removed single line comment functionality as it was deemed unnecessary.
```
> 🎉 Here's to bugs that are no more,
> To logic errors shown the door.
> With sanitized responses, we stand tall,
> In the face of threats, big or small.
> So here's to code that's clean and neat,
> Making our victory oh so sweet! 🥳
<!-- end of auto-generated comment: release notes by OSS CodeRabbit -->1 parent 9e60266 commit 4e128be
3 files changed
+17
-41
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
223 | | - | |
| 223 | + | |
| 224 | + | |
224 | 225 | | |
225 | | - | |
226 | | - | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
| 871 | + | |
| 872 | + | |
871 | 873 | | |
872 | 874 | | |
873 | | - | |
874 | 875 | | |
875 | 876 | | |
876 | 877 | | |
877 | 878 | | |
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
881 | | - | |
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
| 885 | + | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
982 | | - | |
983 | 982 | | |
984 | 983 | | |
985 | 984 | | |
| |||
990 | 989 | | |
991 | 990 | | |
992 | 991 | | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | 992 | | |
1003 | 993 | | |
1004 | 994 | | |
| |||
0 commit comments