forgejo/modules/markup
Gary Kim e887f922ca
Check commit message hashes before making links
Previously, when formatting commit messages, anything
that looked like SHA1 hashes was turned into a link
using regex. This meant that certain phrases or numbers
such as `777777` or `deadbeef` could be recognized as a commit
even if the repository has no commit with those hashes.

This change will make it so that anything that looks
like a SHA1 hash using regex will then also be checked
to ensure that there is a commit in the repository
with that hash before making a link.

Signed-off-by: Gary Kim <gary@garykim.dev>
2019-08-02 15:36:47 +08:00
..
csv Add csv file render support defaultly (#4105) 2018-07-21 00:08:15 +03:00
external Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
markdown Removed unnecessary conversions (#7557) 2019-07-23 19:50:39 +01:00
orgmode Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
html.go Check commit message hashes before making links 2019-08-02 15:36:47 +08:00
html_internal_test.go fix hljs unintenionally highlighting commit links (#7244) 2019-06-18 18:31:31 -04:00
html_test.go Removed unnecessary conversions (#7557) 2019-07-23 19:50:39 +01:00
markup.go Fix wrong init dependency on markup extensions (#7038) 2019-05-25 18:15:39 +01:00
markup_test.go Prioritize "readme.md" (#5691) 2019-01-14 14:15:06 -05:00
sanitizer.go Restructure markup & markdown to prepare for multiple markup language… (#2411) 2017-09-16 20:17:57 +03:00
sanitizer_test.go Restructure markup & markdown to prepare for multiple markup language… (#2411) 2017-09-16 20:17:57 +03:00