diff --git a/src/AppConfig.js b/src/AppConfig.js index f79c518b0..8212b42e3 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -98,7 +98,6 @@ export function initAxiosInterceptors(props) { if (response.data.status === 404) { let responseURL = (response && response.request) ? response.request.responseURL:''; // 组织和个人的拥有情况,404不跳转 - console.log(responseURL) if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1 ) { // 邀请页面不进行404跳转 if( window.location.pathname.includes('/invite') && (responseURL.includes('/simple.json')||responseURL.includes('/detail.json')||responseURL.includes('/menu_list.json'))){ diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 256f1fa15..b38ae1bd4 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -295,13 +295,13 @@ export function turnbar(str){ let s = str; if(s && s.length>0){ if(s.indexOf("%")>-1){ - s = s.replaceAll('%','_25'); + s = s.split('%').join('_25'); } if(s.indexOf("#")>-1){ - s = s.replaceAll('#','%23'); + s = s.split('#').join('%23'); } if(s.indexOf("/")>-1){ - s = s.replaceAll('/','%2F'); + s = s.split('/').join('%2F'); } } return s; @@ -310,13 +310,13 @@ export function returnbar(str){ let s = str; if(s && s.length>0){ if(str.indexOf("_25")>-1){ - s = s.replaceAll('_25','%'); + s = s.split('_25').join('%'); } if(s.indexOf("%23")>-1){ - s = s.replaceAll('%23','#'); + s = s.split('%23').join('#'); } if(s.indexOf("%2F")>-1){ - s = s.replaceAll('%2F','/'); + s = s.split('%2F').join('/'); } } return s; diff --git a/src/components/render-html.jsx b/src/components/render-html.jsx index b8e9aad77..391c1e37b 100644 --- a/src/components/render-html.jsx +++ b/src/components/render-html.jsx @@ -94,7 +94,7 @@ export default ({ for(var x=0;x#${item.project_issues_index}:${item.subject}` : `#${item.project_issues_index}(已删除)`; - rs = rs.replaceAll(`#${item.project_issues_index}`,content); + rs = rs.split(`#${item.project_issues_index}`).join(content); } } @@ -103,7 +103,7 @@ export default ({ return renderToString(_unescape(expression) || '', { displayMode: type === 'block', throwOnError: false, output: 'html' }) }) rs = dompurify.sanitize(rs.replace(/▁/g, "▁▁▁")) - rs = rs.replaceAll('