fix (double encoding): beginning of a solution for #205

This commit is contained in:
itsnotv 2019-11-05 16:59:14 -08:00 committed by Mickael
parent f3a0d282aa
commit 3a2babe072

View file

@ -240,11 +240,11 @@ export class ExistingThing extends React.Component {
}
className = className.trim();
let encodedLink = encodeURIComponent(this.props.file.link).replace(/%2F/g, '/');
let fileLink = this.props.file.link.replace(/%2F/g, '/');
return connectDragSource(connectDropNativeFile(connectDropFile(
<div className={"component_thing view-"+this.props.view+(this.props.selected === true ? " selected" : " not-selected")}>
<ToggleableLink onClick={this.onThingClick.bind(this)} to={encodedLink + window.location.search} disabled={this.props.file.icon === "loading"}>
<ToggleableLink onClick={this.onThingClick.bind(this)} to={fileLink + window.location.search} disabled={this.props.file.icon === "loading"}>
<Card ref="$card"className={this.state.hover} className={className}>
<Image preview={this.state.preview}
icon={this.props.file.icon || this.props.file.type}