mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Fixed encoding issue on autocomplete and input send
This commit is contained in:
@@ -151,7 +151,7 @@ var Frontpage = {
|
|||||||
data: data,
|
data: data,
|
||||||
limit: 5, // The max amount of results that can be shown at once. Default: Infinity.
|
limit: 5, // The max amount of results that can be shown at once. Default: Infinity.
|
||||||
onAutocomplete: function(val) {
|
onAutocomplete: function(val) {
|
||||||
Frontpage.to_channel(val, false);
|
Frontpage.to_channel(Helper.encodeChannelName(val), false);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -894,13 +894,13 @@ function addDynamicListeners() {
|
|||||||
addListener("click", ".listen-button", function(event){
|
addListener("click", ".listen-button", function(event){
|
||||||
if(document.querySelector(".room-namer").value === ""){
|
if(document.querySelector(".room-namer").value === ""){
|
||||||
this.preventDefault();
|
this.preventDefault();
|
||||||
Frontpage.to_channel(document.querySelector(".room-namer").getAttribute("placeholder"));
|
Frontpage.to_channel(Helper.encodeChannelName(document.querySelector(".room-namer").getAttribute("placeholder")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addListener("submit", ".channel-finder", function(event){
|
addListener("submit", ".channel-finder", function(event){
|
||||||
this.preventDefault();
|
this.preventDefault();
|
||||||
Frontpage.to_channel(document.querySelector(".room-namer").value);
|
Frontpage.to_channel(Helper.encodeChannelName(document.querySelector(".room-namer").value));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user