I use the Crayon syntax highlighting plugin in order to display code on this blog. Recently I upgrade my server to PHP 7.3, which broke a fair few things, including this plugin.
Unfortunately, it looks like this plugin is no longer being maintained – the latest stable release was three years ago, and the latest commit on their GitHub was over a year ago.
Never fear, open source is here!
If you’re using the stable version, open up
and change crayon_langs.class.php
from this:crayon_langs.class.php:340
preg_replace('/[^\w-+#]/msi', '', $id);
To this:
preg_replace('/[^\w\-+#]/msi', '', $id);
Notice the escaping before the
character.-
Should work now.