mastodon/spec/models
David Yip 4b68e82a19 Don't add \b to whole-word keywords that don't start with word characters.
Ditto for ending with \b.

Consider muting the phrase "(hot take)".  I stipulate it is reasonable
to enter this with the default "match whole word" behavior.  Under the
old behavior, this would be encoded as

    \b\(hot\ take\)\b

However, if \b is before the first character in the string and the first
character in the string is not a word character, then the match will
fail.  Ditto for after.  In our example, "(" is not a word character, so
this will not match statuses containing "(hot take)", and that's a very
surprising behavior.

To address this, we only add leading and trailing \b to keywords that
start or end with word characters.
2017-10-22 00:38:54 -05:00
..
concerns minor code style fixes oops 2017-09-13 21:47:30 -05:00
form Improve admin page (#4121) 2017-07-18 16:38:22 +02:00
glitch Don't add \b to whole-word keywords that don't start with word characters. 2017-10-22 00:38:54 -05:00
web Web Push Notifications (#3243) 2017-07-13 22:15:32 +02:00
account_domain_block_spec.rb
account_filter_spec.rb
account_moderation_note_spec.rb Add moderation note (#5240) 2017-10-07 20:26:43 +02:00
account_spec.rb Merge branch 'origin/master' into sync/upstream 2017-09-09 14:27:47 -05:00
block_spec.rb
conversation_mute_spec.rb
conversation_spec.rb
custom_emoji_spec.rb Custom emoji (#4988) 2017-09-19 02:42:40 +02:00
domain_block_spec.rb
email_domain_block_spec.rb Implement EmailBlackList (#5109) 2017-10-04 15:16:10 +02:00
export_spec.rb
favourite_spec.rb
feed_spec.rb Improve spec of Feed and UserTrackingConcern (#5367) 2017-10-13 11:00:11 +02:00
follow_request_spec.rb
follow_spec.rb
import_spec.rb Validate data of Imports (#4782) 2017-09-02 20:45:42 +02:00
media_attachment_spec.rb Increase attachment descriptions to 420 characters (#5139) 2017-09-29 02:30:00 +02:00
mention_spec.rb
mute_spec.rb
notification_spec.rb
preview_card_spec.rb
report_filter_spec.rb
report_spec.rb Feat add validation for report comment: characters under 1000 valid (#4833) 2017-09-07 09:55:42 +02:00
session_activation_spec.rb Revocable sessions (#3616) 2017-06-23 18:50:53 +02:00
site_upload_spec.rb Uploads for admin site settings (#4913) 2017-09-14 00:04:30 +02:00
status_pin_spec.rb Pinned statuses (#4675) 2017-08-25 01:41:18 +02:00
status_spec.rb Do not filter statuses with unknown languages (#5045) 2017-09-22 19:33:17 +02:00
stream_entry_spec.rb
subscription_spec.rb
tag_spec.rb add validation to tag name (#4194) 2017-07-14 11:02:49 +02:00
user_spec.rb Application prefs section (#2758) 2017-08-22 18:33:57 +02:00