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.
gitea/modules
mrsdizzie ca46385637 Clean up various use of escape/unescape functions for URL generation (#6334)
* Use PathUnescape instead of QueryUnescape when working with branch names

Currently branch names with a '+' fail in certain situations because
QueryUnescape replaces the + character with a blank space.

Using PathUnescape should be better since it is defined as:

// PathUnescape is identical to QueryUnescape except that it does not
// unescape '+' to ' ' (space).

Fixes #6333

* Change error to match new function name

* Add new util function PathEscapeSegments

This function simply runs PathEscape on each segment of a path without
touching the forward slash itself. We want to use this instead of
PathEscape/QueryEscape in most cases because a forward slash is a valid name for a
branch etc... and we don't want that escaped in a URL.

Putting this in new file url.go and also moving a couple similar
functions into that file as well.

* Use EscapePathSegments where appropriate

Replace various uses of EscapePath/EscapeQuery with new
EscapePathSegments. Also remove uncessary uses of various
escape/unescape functions when the text had already been escaped or was
not escaped.

* Reformat comment to make drone build happy

* Remove no longer used url library

* Requested code changes
6 years ago
..
auth Integrate OAuth2 Provider (#5378) 6 years ago
avatar
base Serve audio files using HTML5 audio tag (#5221) 6 years ago
cache Fix memcache support when value is returned as string always (#2924) 7 years ago
context Clean up various use of escape/unescape functions for URL generation (#6334) 6 years ago
cron Add branch overiew page (#2108) 7 years ago
generate Integrate OAuth2 Provider (#5378) 6 years ago
gzip Pooled and buffered gzip implementation (#5722) 6 years ago
highlight No highlighting for .txt files (#1922) 8 years ago
httplib Add sensitive headers (#3429) 7 years ago
indexer fix bug when set indexer as db and add tests (#6173) 6 years ago
lfs Allow markdown files to read from the LFS (#5787) 6 years ago
log Allow Macaron to be set to log through to gitea.log (#5667) 6 years ago
mailer Make log mailer for testing (#5893) 6 years ago
markup Fix reported issue in repo description (#6306) 6 years ago
metrics Prometheus endpoint (#5256) 6 years ago
minwinsvc
notification refactor issue indexer, add some testing and fix a bug (#6131) 6 years ago
options
pprof cmd/serve: pprof cpu and memory profile dumps to disk (#4560) 7 years ago
private Clean up various use of escape/unescape functions for URL generation (#6334) 6 years ago
process Fix run command race (#1470) 7 years ago
public When redirecting clean the path to avoid redirecting to //www.othersite.com (#5669) 6 years ago
recaptcha Add Recaptcha functionality to Gitea (#4044) 7 years ago
search Global code search support (#3664) 7 years ago
secret Integrate OAuth2 Provider (#5378) 6 years ago
setting split setting.go to multiple files (#6154) 6 years ago
ssh use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines (#5976) 6 years ago
structs Allow to set organization visibility (public, internal, private) (#1763) 6 years ago
sync Fix status table race condition (#1835) 8 years ago
templates Create Progressive Web App (#4730) 6 years ago
test Restrict permission check on repositories and fix some problems (#5314) 6 years ago
uploader Refactor editor upload, update and delete to use git plumbing and add LFS support (#5702) 6 years ago
user Remove check for negative length (#5120) 6 years ago
util Clean up various use of escape/unescape functions for URL generation (#6334) 6 years ago
validation Improve URL validation for external wiki and external issues (#4710) 7 years ago