Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #1809 - norchard:master, r=segiddins
Fixed broken links and overzealous URL encoding in gem server # Description: Bugs introduced in commit a58d893 Fix for Issue #1793: Bad hrefs in 'gem server'- incorrect non-alpha character encoding 1. Reintroduced erroneously deleted characters in links. 2. Removed URL encoding from homepage links, which broke links. For example, "http://rubyonrails.org" became "http%3A%2F%2Frubyonrails.org". Added a method called uri_encode instead of using the deprecated URI.encode to encode unsafe characters without encoding the URL itself. 3. Removed URL encoding from doc path. The doc_root function that generates doc path already encodes the gem name. The second encoding broke the link. ______________ # Tasks: - [X] Describe the problem / feature - [X] Write tests - [X] Write code to solve the problem - [X] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
- Loading branch information
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters