mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 10:22:46 +00:00
fix encode bug (#3076)
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
@@ -224,13 +224,13 @@ class EditorUtilities {
|
||||
|
||||
createDraftFile() {
|
||||
return seafileAPI.createDraft(repoID, filePath).then(res => {
|
||||
window.location.href = serviceUrl + '/lib/' + res.data.origin_repo_id + '/file' + res.data.draft_file_path + '?mode=edit';
|
||||
window.location.href = serviceUrl + '/lib/' + res.data.origin_repo_id + '/file' + Utils.encodePath(res.data.draft_file_path) + '?mode=edit';
|
||||
});
|
||||
}
|
||||
|
||||
publishDraftFile() {
|
||||
return seafileAPI.publishDraft(draftID).then(res => {
|
||||
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + encodeURIComponent(res.data.published_file_path);
|
||||
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + Utils.encodePath(res.data.published_file_path);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user