about summary refs log tree commit diff
path: root/app/lib/formatter.rb
AgeCommit message (Collapse)Author
2019-08-02bbcode: `[code]` produces `pre code` for `glitch-soc` compatabilitymultiple creatures
2019-07-30add an optional blinking cursor to console formattingmultiple creatures
2019-07-29add plain-text console formatting optionmultiple creatures
2019-07-24simplify bbcode url regexmultiple creatures
2019-07-20add newlines before signature & tags for vanilladon compatmultiple creatures
2019-07-19always show out-of-body tags for better accessibilitymultiple creatures
2019-07-17fix bbcode bracket workaroundmultiple creatures
2019-07-17don't include parent components of scoped tags in folded tag listmultiple creatures
2019-07-15sanitize bio formatting!multiple creatures
2019-07-15workaround bbcode parser voring bracketsmultiple creatures
2019-07-15revise bbcode markupmultiple creatures
2019-07-15tag foldingmultiple creatures
2019-05-22**security** - make sure local roars always get sanitizedmultiple creatures
2019-05-21formatted bios + merge monsterpit markdown styles directly into glitch-soc scssmultiple creatures
2019-05-21fix bbdown newlines + format & emojify footersmultiple creatures
2019-05-21correct media reveal wordingmultiple creatures
2019-05-21reimplement monsterpit bbcode and markdown extensions on top of new ↵multiple creatures
glitch-soc formatting system + bbcode feature parity + new `i:am` footer + set content type from `format` bangtag
2019-05-21Add pseudomentions to various hostsmultiple creatures
2019-05-17Minor optimizationThibaut Girka
2019-05-17Properly escape HTML in code blocksThibaut Girka
2019-05-17Fix autolinking, and newlines in code blocksThibaut Girka
Autolinking is now performed *after* the Markdown pass, by replacing HTML tags with zero-width spaces and running the twitter-text extractor as usual, except it does not auto-link URLs to avoid links in links…
2019-05-17Add support for HTML-formatted tootsThibaut Girka
2019-05-17Add support for markdown-formatted tootsThibaut Girka
2019-05-15Minor performance improvements and cleanup in formatter (#10765)ThibG
2019-03-28Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)Eugen Rochko
Also, fix some n+1 queries Resolve #10365
2019-03-20Add support for custom emojis in poll options (#10322)ThibG
* Backend changes for custom emoji support in poll options * Serialize poll emojis in REST API * Render custom emojis in poll options * Render custom emoji in poll options on public pages
2019-03-05Fix newlines in OStatus and RSS serializations (#10183)ThibG
2019-03-05When serializing polls over OStatus, serialize poll options to text (#10160)ThibG
* When serializing polls over OStatus, serialize poll options to text * Do the same for RSS feeds * Use “[ ] ” as a prefix for poll options instead of “- ”
2019-02-09Fix URL linkifier grabbing full-width spaces and quotations (#9997)Eugen Rochko
Fix #9993 Fix #5654
2019-02-09 Only URLs extract with pre-escaped text (#9991)Hinaloe
* [test] add japanese hashtag testcase * Only URLs extract with pre-escaped text ( https://github.com/tootsuite/mastodon/issues/9989 )
2019-02-02Allow most kinds of characters in URL query (fixes #8408) (#8447)Jakub Mendyk
* Allow unicode characters in URL query strings Fixes #8408 * Alternative approach to unicode support in urls Adds PoC/idea to approch this problem.
2018-11-16Remove intermediary arrays when creating hash maps from results (#9291)Eugen Rochko
2018-10-17Improve support for aspects/circles (#8950)Eugen Rochko
* Add silent column to mentions * Save silent mentions in ActivityPub Create handler and optimize it Move networking calls out of the database transaction * Add "limited" visibility level masked as "private" in the API Unlike DMs, limited statuses are pushed into home feeds. The access control rules between direct and limited statuses is almost the same, except for counter and conversation logic * Ensure silent column is non-null, add spec * Ensure filters don't check silent mentions for blocks/mutes As those are "this person is also allowed to see" rather than "this person is involved", therefore does not warrant filtering * Clean up code * Use Status#active_mentions to limit returned mentions * Fix code style issues * Use Status#active_mentions in Notification And remove stream_entry eager-loading from Notification
2018-10-12Improve signature verification safeguards (#8959)Eugen Rochko
* Downcase signed_headers string before building the signed string The HTTP Signatures draft does not mandate the “headers” field to be downcased, but mandates the header field names to be downcased in the signed string, which means that prior to this patch, Mastodon could fail to process signatures from some compliant clients. It also means that it would not actually check the Digest of non-compliant clients that wouldn't use a lowercased Digest field name. Thankfully, I don't know of any such client. * Revert "Remove dead code (#8919)" This reverts commit a00ce8c92c06f42109aad5cfe65d46862cf037bb. * Restore time window checking, change it to 12 hours By checking the Date header, we can prevent replaying old vulnerable signatures. The focus is to prevent replaying old vulnerable requests from software that has been fixed in the meantime, so a somewhat long window should be fine and accounts for timezone misconfiguration. * Escape users' URLs when formatting them Fixes possible HTML injection * Escape all string interpolations in Formatter class Slightly improve performance by reducing class allocations from repeated Formatter#encode calls * Fix code style issues
2018-08-31Fix autoplay issue with spoiler tag (#8540)Renato "Lond" Cerqueira
Add tests to avoid similar issues in the future
2018-08-30Add animate custom emoji param to embed pages (#8507)Renato "Lond" Cerqueira
* Add animate custom emoji param to embed pages * Rename param, use it for avatars and gifs * Fix issues pointed by codeclimate and breaking test * Ignore brakeman warning
2018-05-06Enable custom emojis in profiles (notes, field values, display names) (#7374)Eugen Rochko
Follow-up to #6124
2018-04-27Add entity cache (#7271)Eugen Rochko
* Add entity cache Use a caching layer for mentions and custom emojis that are dynamically extracted from text. Reduce duplicate text extractions * Fix code style issue
2018-04-14Add bio fields (#6645)Eugen Rochko
* Add bio fields - Fix #3211 - Fix #232 - Fix #121 * Display bio fields in web UI * Fix output of links and missing fields * Federate bio fields over ActivityPub as PropertyValue * Improve how the fields are stored, add to Edit profile form * Add rel=me to links in fields Fix #121
2018-04-01[WIP] Enable custom emoji on account pages and in the sidebar (#6124)David Underwood
Federate custom emojis with accounts
2018-03-07Remove text requirement when media attached from statuses (#6672)Eugen Rochko
2018-01-03Don't normalize URLs in toots (#6134)ThibG
* Don't normalize URLs in toots URL normalization is ill-defined and may cause certain links to break. * Change specs since we are not normalizing user-provided URLs
2017-12-06Using double splat operator (#5859)Yamagishi Kazutoshi
2017-11-30Add semi-support for Video/Image objects in ActivityPub (#5848)Eugen Rochko
* Add semi-support for Video/Image objects in ActivityPub Video and Image objects will create corresponding status records with manually crafted text contents (title + URL) * Extract html-url-finding logic into JsonLdHelper * Fallback to id when url missing, extract supported object types
2017-11-07Avoid emojifying on invisible text (#5558)MIYAGI Hikaru
2017-10-06Fix remote profile being displayed in HTML on remote_follow (#5249)unarist
2017-10-05When processing custom emoji, ensure a non-animated version exists (#5230)Eugen Rochko
Use the non-animated version in web UI, but return both in API
2017-09-23Fix custom emojis not detected when used in content warning (#5049)Eugen Rochko
2017-09-19Fix non-local statuses are html_encoded in public_page. (#5012)Naoki Kosaka
2017-09-19Custom emoji (#4988)Eugen Rochko
* Custom emoji - In OStatus: `<link rel="emoji" name="coolcat" href="http://..." />` - In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }` - In REST API: Status object includes `emojis` array (`shortcode`, `url`) - Domain blocks with reject media stop emojis - Emoji file up to 50KB - Web UI handles custom emojis - Static pages render custom emojis as `<img />` tags Side effects: - Undo #4500 optimization, as I needed to modify it to restore shortcode handling in emojify() - Formatter#plaintext should now make sure stripped out line-breaks and paragraphs are replaced with newlines * Fix emoji at the start not being converted