Skip to content

Commit 60a07ed

Browse files
committed
double encode links in tpls
1 parent 7658784 commit 60a07ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/models/notifications/notifier.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ Handlebars.registerHelper('moreChangesSlack', function(repo, commitLog) {
2424

2525

2626
Handlebars.registerHelper('encode', function (str) {
27-
return encodeURIComponent(str);
27+
// we do double encoding here for angular because
28+
// browser would automatically replace `%2F` to `/` and angular router will fail
29+
return encodeURIComponent(encodeURIComponent(str));
2830
});
2931

32+
3033
/**
3134
* Slack requires light escaping with just 3 rules:
3235
* & replaced with &

0 commit comments

Comments
 (0)