Skip to content

Commit 848df4a

Browse files
committed
🐛 Fixed invalid chars in url;
1 parent 955c659 commit 848df4a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Github_Pull_Request_From/Github_Pull_Request_From.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// @updateURL https://github.com/jerone/UserScripts/raw/master/Github_Pull_Request_From/Github_Pull_Request_From.user.js
1212
// @supportURL https://github.com/jerone/UserScripts/issues
1313
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
14-
// @version 14
14+
// @version 15
1515
// @grant none
1616
// @include https://github.com/*/*
1717
// ==/UserScript==
@@ -38,7 +38,7 @@
3838
treeLink.setAttribute("href", String.format("https://github.com/{0}/{1}/tree/{2}",
3939
treeUser ? treeUser.textContent : author, // user;
4040
repo, // repository;
41-
treeParts[treeParts.length - 1].textContent)); // branch;
41+
escape(treeParts[treeParts.length - 1].textContent))); // branch;
4242
treeLink.innerHTML = treeSpan.innerHTML;
4343
treeSpan.innerHTML = "";
4444
treeSpan.appendChild(treeLink);

Github_Pull_Request_From/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Make pull request branches linkable.
2929

3030
## Version History
3131

32+
* **15**
33+
* Fixed invalid chars in url;
3234
* **14**
3335
* Fixed issues after recent layout updates;
3436
* **13**
@@ -47,6 +49,7 @@ Make pull request branches linkable.
4749
* https://github.com/jerone/UserScripts/pull/12 (2 valid, 1 missing);
4850
* https://github.com/jerone/UserScripts/pull/29 (1 mine, 1 extern);
4951
* https://github.com/jerone/UserScripts/pull/47 (3 without username);
52+
* https://github.com/atom/timecop/pull/12 (1 with invalid url chars);
5053

5154

5255
## Contributions

0 commit comments

Comments
 (0)