Skip to content

Commit e7775de

Browse files
committed
Only uri encode version when used in url
Fixes GH-2618
1 parent cdccd88 commit e7775de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sentry/static/sentry/app/components/version.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ const Version = React.createClass({
1515
},
1616

1717
render() {
18-
// NOTE: version is encoded because it can contain slashes "/",
19-
// which can interfere with URL construction
20-
let version = encodeURIComponent(this.props.version);
18+
let version = this.props.version;
2119
let shortVersion = version.length === 40 ? version.substr(0, 12) : version;
2220

2321
let {orgId, projectId} = this.props;
2422

2523
if (this.props.anchor) {
2624
return (
27-
<Link to={`/${orgId}/${projectId}/releases/${version}/`}>
25+
// NOTE: version is encoded because it can contain slashes "/",
26+
// which can interfere with URL construction
27+
<Link to={`/${orgId}/${projectId}/releases/${encodeURIComponent(version)}/`}>
2828
<span title={version}>{shortVersion}</span>
2929
</Link>
3030
);

0 commit comments

Comments
 (0)