new/better regex

should fix #57
This commit is contained in:
Matthias Pfefferle 2019-08-18 21:54:44 +02:00
parent f80f6a791f
commit da155405ee

View file

@ -19,7 +19,7 @@ namespace Activitypub;
* Initialize plugin * Initialize plugin
*/ */
function init() { function init() {
defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(^|\s|\/>)#([^\s<>]+)\b' ); defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?<=[\s>]|^)#(\w*[A-Za-z_]+\w*)\b(?!;)' );
require_once dirname( __FILE__ ) . '/includes/class-signature.php'; require_once dirname( __FILE__ ) . '/includes/class-signature.php';
require_once dirname( __FILE__ ) . '/includes/class-activity.php'; require_once dirname( __FILE__ ) . '/includes/class-activity.php';