diff --git a/src/main/java/org/olat/core/servlets/HeadersFilter.java b/src/main/java/org/olat/core/servlets/HeadersFilter.java index 3facbe90793e97ef98417a740f687c816c4e6605..e916e77026bf8b37335eeb1e6349ff0b0cb05ef6 100644 --- a/src/main/java/org/olat/core/servlets/HeadersFilter.java +++ b/src/main/java/org/olat/core/servlets/HeadersFilter.java @@ -214,9 +214,10 @@ public class HeadersFilter implements Filter { } private void appendMathJaxUrl(StringBuilder sb) { - if(StringHelper.containsNonWhitespace(WebappHelper.getMathJaxCdn())) { + String mathJaxCdn = WebappHelper.getMathJaxCdn(); + if(StringHelper.containsNonWhitespace(mathJaxCdn) + && (mathJaxCdn.startsWith("//") || mathJaxCdn.startsWith("https://") || mathJaxCdn.startsWith("http://"))) { try { - String mathJaxCdn = WebappHelper.getMathJaxCdn(); if(mathJaxCdn.startsWith("//")) { mathJaxCdn = "https:" + mathJaxCdn; }