Commit graph

91 commits

Author SHA1 Message Date
Haelwenn (lanodan) Monnier
3623504e5d
[Pleroma.Formatter]: Add support for non-HTTP schemes in URIs
The call to the regex in add_links is there just to be sure it’s a legal URI, it can be removed if you want to get more performance.

The URI Schemes list is sorted, but with http(s) at the start (in case it might make it faster for common links).

Closes: https://git.pleroma.social/pleroma/pleroma/issues/127
2018-07-30 22:01:48 +02:00
Jorty
748fff6544 Fix auto-shortcode emoji
Emoji were broken due to `Pleroma.Formatter` not knowing about the
auto-shortcode emoji. This moves that logic from
`Pleroma.Web.TwitterAPI.UtilController` to `Pleroma.Formatter`.

Additionally, it's now possible to specify multiple shortcode globs, and
the default globs were changed to `["/emoji/custom/**/*.png"]`, since
that's in the .gitignore and the files there would have to be shortcode
emoji anyway.
2018-06-30 21:31:08 -04:00
William Pitcock
d7eb2e1b65 run mix format 2018-05-27 13:06:38 +00:00
William Pitcock
a8df7fc690 formatter: use class='mention' on links to user profiles
helps mastodon frontend and apps have better context:
https://mastodon.social/users/Gargron/statuses/100101267352899379
2018-05-27 12:56:24 +00:00
Thog
6f39ecc41b
Support Undo like activities (Fix ) 2018-05-19 22:14:15 +02:00
lain
df95118c81 Fix linking problem. 2018-05-19 11:27:14 +02:00
lain
0574df273c Small cleanup. 2018-04-22 10:01:10 +02:00
lain
0c221943ef Formatter: Use proper escaping for links. 2018-04-21 18:27:31 +02:00
lain
60f92e406c Accept port number in urls. 2018-04-06 16:35:54 +02:00
lain
81600c94f4 Handle + in links. 2018-04-04 11:29:03 +02:00
lain
806550c921 Use user url in mention if we have it. 2018-04-03 18:32:46 +02:00
lain
4afbef39f4 Format the code. 2018-03-30 15:01:53 +02:00
lain
df8fc72491 Don't go through all available emoji.
object carry their emoji information.
2018-03-28 09:56:32 +02:00
Francis Dinh
61692c7efa Include the '#' symbol into the link itself 2018-03-27 02:00:04 -04:00
lain
eb7ce61ca5 Fix hashtags. 2018-03-24 11:03:10 +01:00
lain
fbe9aa3506 Strip html from emoji stuff. 2018-03-23 19:52:08 +01:00
eal
ab8b9ababa Split emoji to default and custom. 2018-01-31 16:29:22 +02:00
lambda
35ac549a99 Merge branch 'media-proxy' into 'develop'
Media proxy

See merge request 
2017-12-20 14:22:24 +00:00
Lain Iwakura
f1f79c0dca Fix timelines in subway tooter. 2017-12-19 16:15:07 +01:00
Lain Iwakura
47887ac848 MastoAPI: Fix always-sensitive bugs. 2017-12-18 16:56:03 +01:00
href
f909aec050
proxy emojis
(i fix emojos better than gargon but sshhhhh)
2017-12-12 12:30:24 +01:00
eal
a3e68f0233 Allow parentheses in links. 2017-12-07 21:38:31 +02:00
eal
bf91e5659f Fix HTML escape breaking some links. 2017-12-07 21:36:06 +02:00
eal
f53cdabcdf Add #nsfw tag if sensitive content bit is set 2017-11-18 16:30:18 +02:00
lambda
be67db5547 Merge branch 'mastodon-emoji-endpoint' into 'develop'
Add mastodon API endpoint for custom emoji.

See merge request 
2017-11-07 20:01:15 +00:00
eal
c6210183e1 Add mastodon API endpoint for custom emoji. 2017-11-07 21:55:01 +02:00
Roger Braun
7da978f3f5 Linkify fixes. 2017-11-07 12:06:37 +01:00
eal
fe7804e42d Add an API endpoint for emoji. 2017-10-19 22:51:56 +03:00
Roger Braun
fb46d6fbc4 Prefer post-specific emoji. 2017-09-17 13:24:52 +02:00
Roger Braun
7c82b82197 Make emoji configurable in files. 2017-09-16 16:49:46 +02:00
Roger Braun
959e993c7d Apply incoming custom emoji. 2017-09-16 16:40:20 +02:00
Roger Braun
884006a9e9 Federate emoji out. 2017-09-16 16:14:23 +02:00
Roger Braun
79aeb219d8 Small emoji refactor. 2017-09-16 15:47:45 +02:00
lambadalambda
8004ee8ccf Merge branch 'patch-1' into 'develop'
Fix finmoji title attribute.

See merge request 
2017-08-18 05:33:42 -04:00
Roger Braun
2ab1d915e3 Use unicode regex in mentions and links. 2017-08-14 17:56:45 +02:00
エーロ
6c70980bff Fix finmoji title attribute. 2017-07-09 11:00:02 -04:00
Roger Braun
66b4fee80e Add finmoji. 2017-06-19 17:51:43 +02:00
Roger Braun
6cac8e3c8b Downcase tags coming in through the TwAPI. 2017-06-18 19:04:46 +02:00
Roger Braun
a9bfbcae80 Slightly better html link regex. 2017-06-18 13:29:30 +02:00
Roger Braun
1af9c77736 Move mention parsing to Formatter module. 2017-06-14 13:58:56 +02:00
Roger Braun
dcfd494e97 Add Formatter. 2017-05-17 18:00:09 +02:00