Found it! I had CFG_WEBSEARCH_USE_MATHJAX_FOR_FORMATS = hd, hb instead of hd,hb This extra space after the comma messed things up and if of.lower() in CFG_WEBSEARCH_USE_MATHJAX_FOR_FORMATS: metaheaderadd = get_mathjax_header(req.is_https()) in search_engine.py was never executed.
Next time i'll stick to the example! :) Best regards, Theodoros