1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

fix encode bug (#3076)

This commit is contained in:
陈钦亮
2019-03-07 17:15:30 +08:00
committed by Daniel Pan
parent cb4dedfb15
commit f204e41d64
2 changed files with 4 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ import classnames from 'classnames';
import HistoryList from './pages/review/history-list';
import { Value, Document, Block } from 'slate';
import ModalPortal from './components/modal-portal';
import { Utils } from './utils/utils';
import './assets/css/fa-solid.css';
import './assets/css/fa-regular.css';
@@ -379,7 +380,7 @@ class Draft extends React.Component {
onPublishDraft = () => {
seafileAPI.publishDraft(draftID).then(res => {
const OriginFileLink = siteRoot + 'lib/' + draftRepoID + '/file' + encodeURIComponent(res.data.published_file_path) + '/';
const OriginFileLink = siteRoot + 'lib/' + draftRepoID + '/file' + Utils.encodePath(res.data.published_file_path);
window.location.href = OriginFileLink;
});
}