url check

This commit is contained in:
Jack 2021-07-23 01:31:27 +01:00
parent 3c6b324728
commit c5dae38d70

View file

@ -1480,9 +1480,10 @@ export function setCustomBackground(value, nosave) {
}
value = value.trim();
if (
/(https|http):\/\/(www\.|).+\..+\/.+(\.png|\.gif|\.jpeg|\.jpg)/gi.test(
(/(https|http):\/\/(www\.|).+\..+\/.+(\.png|\.gif|\.jpeg|\.jpg)/gi.test(
value
) ||
) &&
!/[<>]/.test(value)) ||
value == ""
) {
config.customBackground = value;