mirror of
https://github.com/zoriya/flood.git
synced 2025-12-21 06:35:14 +00:00
Encode and decode labels as URI components
This commit is contained in:
@@ -294,7 +294,7 @@ class ClientRequest {
|
||||
let methodName = 'd.custom1.set';
|
||||
|
||||
let tags = options.tags.reduce((memo, currentTag) => {
|
||||
let tag = currentTag.trim();
|
||||
let tag = encodeURIComponent(currentTag.trim());
|
||||
|
||||
if (tag !== '' && memo.indexOf(tag) === -1) {
|
||||
memo.push(tag);
|
||||
|
||||
@@ -203,7 +203,9 @@ class Torrent {
|
||||
}
|
||||
|
||||
getCalculatedTags(clientData) {
|
||||
return clientData.tags.split(',').sort();
|
||||
return clientData.tags.split(',').sort().map((tag) => {
|
||||
return decodeURIComponent(tag);
|
||||
});
|
||||
}
|
||||
|
||||
getCalculatedTotalPeers(clientData) {
|
||||
|
||||
Reference in New Issue
Block a user