It seems clear from the context that what's being discussed is not "can a country enforce it's laws on a foreign citizen within it's borders" but "can a country enforce it's laws on a foreign citizen outside it's borders".
If I were ever to go to North Korea their government could of course arrest me for insulting Kim Jong Un. What they could not do, and absolutely should not be able to do, is have my local police in the US arrest me for doing the same at home. Yes, even if I do it on the internet where a citizen of North Korea might theoretically see, or make use of content I acquired over the internet that originated in that country.