You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules/markup
mrsdizzie b5f28d154d
Don't manually replace whitespace during render (#10291)
* Don't manually replace whitespace during render

For historical reasons Gitea manually alters the urlPrefix and replaces
a whitespace with a +. This Works for URLs, but we're also passing
urlPrefix to git calls and adding the + is breaking the tree path.

Goldmark will automatically convert a white space to the proper %20, so
we should leave the string as is which lets us pass it to git unmodified
and then let Goldmark fix it.

Also fixed separate bug in URLJoin I noticed while testing where it will
silently discard sections of a path that have # in them (possibly
others). We should just escape it first.

Fixes 10156

* Escape elems as well

* Revert "Escape elems as well"

This reverts commit 8bf49596fee6fac4d9da256cd1e90a0ec0183671.

* restart ci

* remove changes to URLJoin

* restart ci

Co-authored-by: techknowlogick <matti@mdranta.net>
4 years ago
..
common Change markdown rendering from blackfriday to goldmark (#9533) 5 years ago
csv Detect delimiter in CSV rendering (#7869) 5 years ago
external Better logging (#6038) (#6095) 5 years ago
markdown Don't manually replace whitespace during render (#10291) 4 years ago
mdstripper Change markdown rendering from blackfriday to goldmark (#9533) 5 years ago
orgmode Update go-org to optimize code (#8824) 5 years ago
html.go Issue/PR Context Popups (#9822) 5 years ago
html_internal_test.go Issue/PR Context Popups (#9822) 5 years ago
html_test.go Issue/PR Context Popups (#9822) 5 years ago
markup.go Don't manually replace whitespace during render (#10291) 4 years ago
markup_test.go Prioritize "readme.md" (#5691) 6 years ago
sanitizer.go Issue/PR Context Popups (#9822) 5 years ago
sanitizer_test.go Allow kbd tags (#9245) 5 years ago