[markdown] Escape mentions which username can contain Markdown-like syntax #1039

Merged
MrPetovan merged 1 commit from bug/9486-markdown-escape-mentions into develop 2020-11-02 20:11:39 +01:00
MrPetovan commented 2020-11-02 17:07:53 +01:00 (Migrated from github.com)

Fixes https://github.com/friendica/friendica/issues/9486

This PR normalizes the block escaping by using both BBCode::performWithEscapedTags to escape tags and Strings::performWithEscapedBlocks to escape mentions.

The regular expression is voluntarily restricted to mentions in the form @user@domain.tld or !user@domain.tld but it could be expanded to include hashtags as well.

Fixes https://github.com/friendica/friendica/issues/9486 This PR normalizes the block escaping by using both `BBCode::performWithEscapedTags` to escape tags and `Strings::performWithEscapedBlocks` to escape mentions. The regular expression is voluntarily restricted to mentions in the form `@user@domain.tld` or `!user@domain.tld` but it could be expanded to include hashtags as well.
Sign in to join this conversation.
No description provided.