When it comes to pedos in specific, the UK got absolutely shaken by the scandals of the last few years - Jimmy Savile, Epstein being involved right into the Royal Family, just to state the obvious ones.
As for terrorism, the problem dates back a bit deeper, the UK has had the IRA conflict for decades, and to this day the conflict isn't resolved, the only thing that did happen was the IRA got formally disbanded in 2005.