Commit graph

91 commits

Author SHA1 Message Date
Egor f9af90c5aa Revert "simplify mentions escape"
This reverts commit f3e06a1030636f24f7129dd93bb9780e67fb7de1.
2019-04-12 19:25:53 +00:00
Alex S 3601f03147 Adding tag to emoji ets table
changes in apis
2019-04-01 17:17:57 +07:00
lain 8468f3f6d4 Add safe dm mode option. 2019-03-20 21:09:36 +01:00
Haelwenn (lanodan) Monnier c42d34b2ec
[Credo] fix Credo.Check.Readability.MaxLineLength 2019-03-13 04:26:56 +01:00
Egor Kislitsyn 5d961d536c fix formatter 2019-02-27 15:40:30 +07:00
Egor c3ac9424d2 AutoLinker 2019-02-26 23:32:26 +00:00
Haelwenn (lanodan) Monnier 6a6a5b3251
de-group alias/es 2019-02-09 16:31:17 +01:00
Haelwenn (lanodan) Monnier 60ea29dfe6
Credo fixes: alias grouping/ordering 2019-02-09 14:59:20 +01:00
kaniini c9b418e547 Merge branch 'develop' into 'oembed_provider'
# Conflicts:
#   lib/pleroma/activity.ex
2019-01-25 05:00:47 +00:00
rinpatch 74346a7035 Fix merge conflict 2019-01-18 18:31:25 +03:00
rinpatch 997f4a5e09 Remove custom emojis and trailing whitespaces from previews 2019-01-18 10:28:19 +03:00
Ivan Tashkinov 65bb9b2fba [#491] Made full nicknames be preserved in user links text only in Bio. 2019-01-18 09:30:16 +03:00
Ivan Tashkinov 2bfae25a1f [#491] Made user bio preserve full nicknames (nick@host). 2019-01-17 18:03:49 +03:00
William Pitcock 461ab9489d formatter: improve microformats markup 2019-01-16 03:54:01 +00:00
rinpatch 9aa69e12b8 Add behaviours to TwitterCard, remove some dumb stuff in Formatter.truncate 2019-01-15 23:25:28 +03:00
rinpatch e4dc3f71ae Resolve merge conflict 2019-01-13 13:38:28 +03:00
William Pitcock 980b5288ed update copyright years to 2019 2018-12-31 15:41:47 +00:00
William Pitcock 2791ce9a1f add license boilerplate to pleroma core 2018-12-23 20:56:42 +00:00
Maksim f1b93b5be7 [#413] fix parse mentions 2018-12-20 09:35:01 +00:00
raeno 7fb3780431 Merge branch 'develop' into oembed_provider 2018-12-19 22:39:44 +04:00
rinpatch 059dd6f681 Ignore HTML characters in formatter.ex 2018-12-18 21:38:15 +03:00
raeno a300336459 Merge branch 'develop' into oembed_provider 2018-12-18 14:59:32 +01:00
Maksim Pechnikov bc6262d250 fixed typo 2018-12-14 21:21:37 +03:00
Maksim Pechnikov baead4ea4b fix markdown formatting 2018-12-14 16:03:58 +03:00
raeno b5de7c4c4d Remove oembed for now, will submit it in another MR. Fix warnings 2018-12-13 22:34:15 +01:00
raeno 8902942128 WIP. Implement oembed route and handle both json/xml for "Note" type activity 2018-12-13 22:17:53 +01:00
href 7214d57463
Extended nicknames: allow dashes. 2018-12-12 21:48:54 +01:00
href 7d9ddbe689
Allow underscores in usernames.
Fixes #429.
2018-12-12 18:57:33 +01:00
Vald 3ccfe226c0 added data attrs for user and tag 2018-12-06 01:05:41 +05:30
lain 4c918392c6 Fix most User tests. 2018-11-18 21:40:52 +01:00
href 5bb88fd174
Runtime configuration
Related to #85

Everything should now be configured at runtime, with the exception of
the `Pleroma.HTML` scrubbers (the scrubbers used can be
changed at runtime, but their configuration is compile-time) because
it's building a module with a macro.
2018-11-06 19:41:15 +01:00
href 763fc7b44f
Runtime configured emojis
The changes are a bit heavy since the emojis were loaded into module
attributes from filesystem.

This introduces a GenServer using an ETS table to cache in memory the
emojis, and allows a runtime-reload with `Pleroma.Emoji.reload()`.
2018-11-05 13:24:00 +01:00
scarlett ae5beb7b64 Make finmoji optional 2018-10-25 17:58:46 +01:00
kaniini ad3181895c Merge branch 'bugfix/html-scrub-schemes' into 'develop'
lib/pleroma/html.ex: Fix scheme lists

See merge request pleroma/pleroma!377
2018-10-18 14:36:40 +00:00
Haelwenn (lanodan) Monnier 2154c5dcd8
lib/pleroma/html.ex: Use macros for valid_schemes, change config for schemes 2018-10-18 07:58:15 +02:00
William Pitcock 582dbe5c8d formatter: fix matching osada users 2018-10-17 19:15:20 +00:00
William Pitcock 52b05137c5 formatter: use Pleroma.HTML module instead of HtmlSanitizeEx directly 2018-10-05 20:49:34 +00:00
William Pitcock b1be9415ef Revert "Merge branch 'revert-a26d5e6b' into 'develop'"
This reverts commit d31bbb1cfe, reversing
changes made to 340ab3cb90.
2018-10-05 20:49:34 +00:00
Haelwenn (lanodan) Monnier a3cffd3566
formatter: Stop using phoenix HTML and format it ourselves
* Pheonix has an extra scheme whitelist conflicting with ours
* Pheonix doesn’t seems to do URL encoding, just HTML encoding

Closes: https://git.pleroma.social/pleroma/pleroma/issues/307
2018-09-28 17:32:27 +02:00
William Pitcock ac486fc59b everywhere: use Pleroma.HTML module instead of HtmlSanitizeEx directly 2018-09-10 00:14:47 +00:00
kaniini 7ca2a2ddea Merge branch 'nil-bio-emojis' into 'develop'
add nil clause for Formatter.get_emoji/1 to return an empty result

Closes #274

See merge request pleroma/pleroma!315
2018-09-03 05:54:11 +00:00
Thurloat 4257f784bc sloop around get_emoji/1 to check is_binary and have a fallthrough
default that returns empty
2018-09-02 20:44:37 -03:00
William Pitcock 834515fb51 formatter: don't add XSS emoji 2018-09-02 00:04:09 +00:00
Thurloat a9c0f395cb add nil clause for Formatter.get_emoji/1 to return an empty result 2018-08-31 14:29:23 -03:00
lambda 58539e1357 Revert "Merge branch 'feature/rich-text' into 'develop'"
This reverts merge request !309
2018-08-31 09:51:20 +00:00
William Pitcock 6aa65b68b8 common api: add support for formatting messages outside of twitter-style plain text 2018-08-31 03:13:59 +00:00
William Pitcock 3e10d13909 formatter: adjust regexp captures to match local users with single character nicknames (closes #163) 2018-08-24 18:22:47 +00:00
kaniini 183ccd1812 Merge branch 'dev-lanodan-url-regex' into 'develop'
lib/pleroma/formatter.ex: Fix URL regex

Closes #127

See merge request pleroma/pleroma!69
2018-08-16 15:41:16 +00:00
William Pitcock 0ee29994a5 formatter: preserve case of hashtags
when generating hashtag links, we used the casefolded version that we use in
the link URLs, instead of the original version.

accordingly, adjust the formatter to use the original text for the links, while
keeping the casefolded version for the URLs.
2018-08-05 00:37:38 +00:00
Haelwenn (lanodan) Monnier d5091c3175
Allow additionnal schemes in the config 2018-08-01 02:52:42 +02:00