IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Переглянути джерело

Better encoding of collectionPath in the URL.

pull/1/head
Stanislaw Adaszewski 4 роки тому
джерело
коміт
3c7aa92fb0
1 змінених файлів з 5 додано та 1 видалено
  1. +5
    -1
      frontend/src/js/component/wb-collection-content.js

+ 5
- 1
frontend/src/js/component/wb-collection-content.js Переглянути файл

@@ -11,6 +11,10 @@ function unescapeName(name) {
(_, $1) => ($1 === '\\\\' ? '\\' : String.fromCharCode(parseInt($1.substr(1), 8))));
}
function encodeURIComponentIncludingDots(s) {
return encodeURIComponent(s).replace('.', '%2E');
}
class WBCollectionContent extends Component {
constructor(...args) {
super(...args);
@@ -26,7 +30,7 @@ class WBCollectionContent extends Component {
getUrl(params) {
let res = '/collection-browse/' +
('uuid' in params ? params.uuid : this.props.uuid) + '/' +
encodeURIComponent('collectionPath' in params ? params.collectionPath : this.props.collectionPath) + '/' +
encodeURIComponentIncludingDots('collectionPath' in params ? params.collectionPath : this.props.collectionPath) + '/' +
('page' in params ? params.page : this.props.page);
return res;
}


Завантаження…
Відмінити
Зберегти