diff --git a/classes/class-wpcom-liveblog-entry-extend-feature-hashtags.php b/classes/class-wpcom-liveblog-entry-extend-feature-hashtags.php index cd8818e4f..f9a051207 100644 --- a/classes/class-wpcom-liveblog-entry-extend-feature-hashtags.php +++ b/classes/class-wpcom-liveblog-entry-extend-feature-hashtags.php @@ -39,6 +39,32 @@ public function load() { // the generated hashtag class. $this->class_prefix = apply_filters( 'liveblog_hashtag_class', $this->class_prefix ); + $prefixes = implode( '|', $this->get_prefixes() ); + + // Set a better regex for hashtags to allow for hex values in content -- see https://regex101.com/r/CLWsCo/ + // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- ignore indentation + $this->set_regex( + '~' + . '(?:' + . '(??' // possible right angle bracket(s) + . ')' + . '(?:' + . '(?