diaspora/lib/diaspora
Benjamin Neff 536c96f217
Escape mentions before parsing message with markdown
Usernames that contained underscores were parsed by markdown first. This
broke the diaspora IDs and also added weird html at places where it
wasn't needed. Escaping them before sending the message through the
markdown parser fixes this issue.

As underscores are the only allowed character that can be used for
markdown that is also allowed inside a diaspora ID, this escaping can be
kept pretty simple.

This only fixes it for the mobile UI at the moment, for the desktop UI
it's probably better to fix it in markdown-it.

Related to #7975
2022-10-06 00:45:50 +02:00
..
exporter Memory usage optimization for archive export 2017-09-26 04:07:18 +02:00
federated Merge branch 'next-minor' into develop 2022-06-29 13:28:02 +02:00
federation Merge branch 'next-minor' into develop 2022-07-20 21:34:39 +02:00
fetcher post fetch: use warn not debug for exception logging 2022-09-05 23:22:26 +03:00
fields Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
markdownify Revert "Revert "Bump twitter-text"" 2018-04-12 04:01:52 +02:00
camo.rb Ignore invalid URLs for camo 2018-11-04 03:06:21 +01:00
commentable.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
entity_finder.rb Add LinksController 2018-07-11 01:24:28 +02:00
exceptions.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
exporter.rb Memory usage optimization for archive export 2017-09-26 04:07:18 +02:00
federated.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
federation.rb Resend AccountMigration or AccountDeletion for closed recipients 2021-10-25 03:34:03 +02:00
fetcher.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
likeable.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
logging.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
markdownify.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
mentionable.rb Escape mentions before parsing message with markdown 2022-10-06 00:45:50 +02:00
mentions_container.rb Remove backporting of mention syntax 2018-04-15 15:49:23 +02:00
message_renderer.rb Escape mentions before parsing message with markdown 2022-10-06 00:45:50 +02:00
relayable.rb Relay likes for comments 2017-09-28 23:04:35 +02:00
shareable.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
signature.rb Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
taggable.rb Fix deprecation warnings for rails 6.1 2022-07-20 21:27:41 +02:00