Fixed slashes issues in channel-names

This commit is contained in:
Kasper Rynning-Tønnesen
2018-05-31 15:49:17 +02:00
parent ded625ae25
commit f7664ac32b
3 changed files with 4 additions and 2 deletions

View File

@@ -114,6 +114,7 @@ app.use('/assets/admin', function(req, res, next) {
app.use('/assets', express.static(publicPath + '/assets')); app.use('/assets', express.static(publicPath + '/assets'));
app.use(function (req, res, next) { app.use(function (req, res, next) {
console.log("here");
res.status(404); res.status(404);
res.redirect("/404"); res.redirect("/404");
}) })

View File

@@ -320,7 +320,7 @@ var Frontpage = {
Helper.css("#channel-load", "display", "block"); Helper.css("#channel-load", "display", "block");
window.scrollTo(0, 0); window.scrollTo(0, 0);
frontpage = false; frontpage = false;
new_channel = new_channel.toLowerCase(); new_channel = Helper.encodeChannelName(new_channel.toLowerCase());
clearTimeout(rotation_timeout); clearTimeout(rotation_timeout);
if(Helper.mobilecheck()){ if(Helper.mobilecheck()){
Helper.log(["removing all listeners"]); Helper.log(["removing all listeners"]);
@@ -336,6 +336,7 @@ var Frontpage = {
Helper.tooltip(document.querySelectorAll(".pin")[0].parentElement.parentElement.parentElement, "destroy"); Helper.tooltip(document.querySelectorAll(".pin")[0].parentElement.parentElement.parentElement, "destroy");
} }
} }
currently_showing_channels = 1; currently_showing_channels = 1;
clearTimeout(retry_frontpage); clearTimeout(retry_frontpage);
Helper.ajax({ Helper.ajax({

View File

@@ -13,7 +13,7 @@
autocomplete="off" autocomplete="off"
autofocus autofocus
required required
pattern="[^/\\]+"
spellcheck="false" spellcheck="false"
maxlength="18" maxlength="18"
data-length="18" data-length="18"