aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
AgeCommit message (Collapse)Author
2019-01-25Merge branch 'develop' into 'oembed_provider'kaniini
# Conflicts: # lib/pleroma/activity.ex
2019-01-18Fix merge conflictrinpatch
2019-01-18Remove custom emojis and trailing whitespaces from previewsrinpatch
2019-01-18[#491] Made full nicknames be preserved in user links text only in Bio.Ivan Tashkinov
2019-01-17[#491] Made user bio preserve full nicknames (nick@host).Ivan Tashkinov
2019-01-16formatter: improve microformats markupWilliam Pitcock
2019-01-15Add behaviours to TwitterCard, remove some dumb stuff in Formatter.truncaterinpatch
2019-01-13Resolve merge conflictrinpatch
2018-12-31update copyright years to 2019William Pitcock
2018-12-23add license boilerplate to pleroma coreWilliam Pitcock
2018-12-20[#413] fix parse mentionsMaksim
2018-12-19Merge branch 'develop' into oembed_providerraeno
2018-12-18Ignore HTML characters in formatter.exrinpatch
2018-12-18Merge branch 'develop' into oembed_providerraeno
2018-12-14fixed typoMaksim Pechnikov
2018-12-14fix markdown formattingMaksim Pechnikov
2018-12-13Remove oembed for now, will submit it in another MR. Fix warningsraeno
2018-12-13WIP. Implement oembed route and handle both json/xml for "Note" type activityraeno
2018-12-12Extended nicknames: allow dashes.href
2018-12-12Allow underscores in usernames.href
Fixes #429.
2018-12-06added data attrs for user and tagVald
2018-11-18Fix most User tests.lain
2018-11-06Runtime configurationhref
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-05Runtime configured emojishref
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-10-25Make finmoji optionalscarlett
2018-10-18Merge branch 'bugfix/html-scrub-schemes' into 'develop'kaniini
lib/pleroma/html.ex: Fix scheme lists See merge request pleroma/pleroma!377
2018-10-18lib/pleroma/html.ex: Use macros for valid_schemes, change config for schemesHaelwenn (lanodan) Monnier
2018-10-17formatter: fix matching osada usersWilliam Pitcock
2018-10-05formatter: use Pleroma.HTML module instead of HtmlSanitizeEx directlyWilliam Pitcock
2018-10-05Revert "Merge branch 'revert-a26d5e6b' into 'develop'"William Pitcock
This reverts commit d31bbb1cfe04ca6073a322bcf77239e7d4b79839, reversing changes made to 340ab3cb9068d444b77213e07beb8c2c3ca128b9.
2018-09-28formatter: Stop using phoenix HTML and format it ourselvesHaelwenn (lanodan) Monnier
* 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-10everywhere: use Pleroma.HTML module instead of HtmlSanitizeEx directlyWilliam Pitcock
2018-09-03Merge branch 'nil-bio-emojis' into 'develop'kaniini
add nil clause for Formatter.get_emoji/1 to return an empty result Closes #274 See merge request pleroma/pleroma!315
2018-09-02sloop around get_emoji/1 to check is_binary and have a fallthroughThurloat
default that returns empty
2018-09-02formatter: don't add XSS emojiWilliam Pitcock
2018-08-31add nil clause for Formatter.get_emoji/1 to return an empty resultThurloat
2018-08-31Revert "Merge branch 'feature/rich-text' into 'develop'"lambda
This reverts merge request !309
2018-08-31common api: add support for formatting messages outside of twitter-style ↵William Pitcock
plain text
2018-08-24formatter: adjust regexp captures to match local users with single character ↵William Pitcock
nicknames (closes #163)
2018-08-16Merge branch 'dev-lanodan-url-regex' into 'develop'kaniini
lib/pleroma/formatter.ex: Fix URL regex Closes #127 See merge request pleroma/pleroma!69
2018-08-05formatter: preserve case of hashtagsWilliam Pitcock
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-01Allow additionnal schemes in the configHaelwenn (lanodan) Monnier
2018-07-30[Pleroma.Formatter]: Add support for non-HTTP schemes in URIsHaelwenn (lanodan) Monnier
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-06-30Fix auto-shortcode emojiJorty
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-05-27run mix formatWilliam Pitcock
2018-05-27formatter: use class='mention' on links to user profilesWilliam Pitcock
helps mastodon frontend and apps have better context: https://mastodon.social/users/Gargron/statuses/100101267352899379
2018-05-19Support Undo like activities (Fix #139)Thog
2018-05-19Fix linking problem.lain
2018-04-22Small cleanup.lain
2018-04-21Formatter: Use proper escaping for links.lain