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 8bf49596fe.

* restart ci

* remove changes to URLJoin

* restart ci

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-02-17 07:46:51 +02:00
..
common Change markdown rendering from blackfriday to goldmark (#9533) 2019-12-31 03:53:28 +02:00
csv Detect delimiter in CSV rendering (#7869) 2019-08-16 01:09:50 +03:00
external Better logging (#6038) (#6095) 2019-04-02 08:48:31 +01:00
markdown Don't manually replace whitespace during render (#10291) 2020-02-17 07:46:51 +02:00
mdstripper Change markdown rendering from blackfriday to goldmark (#9533) 2019-12-31 03:53:28 +02:00
orgmode Update go-org to optimize code (#8824) 2019-11-05 16:39:03 +08:00
html.go Issue/PR Context Popups (#9822) 2020-01-19 23:39:21 -05:00
html_internal_test.go Issue/PR Context Popups (#9822) 2020-01-19 23:39:21 -05:00
html_test.go Issue/PR Context Popups (#9822) 2020-01-19 23:39:21 -05:00
markup.go Don't manually replace whitespace during render (#10291) 2020-02-17 07:46:51 +02:00
markup_test.go Prioritize "readme.md" (#5691) 2019-01-14 14:15:06 -05:00
sanitizer.go Issue/PR Context Popups (#9822) 2020-01-19 23:39:21 -05:00
sanitizer_test.go Allow kbd tags (#9245) 2019-12-03 14:02:41 -05:00