about summary refs log tree commit diff
path: root/spec/lib/formatter_spec.rb
AgeCommit message (Collapse)Author
2020-01-23Add support for magnet: URIs (#12905)ThibG
2020-01-11Add support for linking XMPP URIs in toots (#12709)ThibG
* Fix wrong grouping in Twitter valid_url regex * Add support for xmpp URIs Fixes #9776 The difficult part is autolinking, because Twitter-text's extractor does some pretty ad-hoc stuff to find things that “look like” URLs, and XMPP URIs do not really match the assumptions of that lib, so it doesn't sound wise to try to shoehorn it into the existing regex. This is why I used a specific regex (very close, although slightly more permissive than the RFC), and a specific scan function (a simplified version of the generalized one from Twitter). * Remove leading “xmpp:” from auto-linked text
2019-07-21Play animated custom emoji on hover (#11348)ThibG
* Play animated custom emoji on hover in status * Play animated custom emoji on hover in display names * Play animated custom emoji on hover in bios/bio fields * Add support for animation on hover on public pages emojis too * Fix tests * Code style cleanup
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-10-29Bump sanitize from 4.6.6 to 5.0.0 (#9140)Eugen Rochko
2018-10-04Lint pass (#8876)aus-social
2018-08-31Fix autoplay issue with spoiler tag (#8540)Renato "Lond" Cerqueira
Add tests to avoid similar issues in the future
2018-08-29formatter spec fixes & clarification (#8481)sundevour
updates some "context" and "it" lines to have clearer explanations updates "context" lines to properly describe function input, and "it" lines to describe results
2018-04-25Append '.test' to hostname in stub data (#7260)MIYAGI Hikaru
2018-04-01[WIP] Enable custom emoji on account pages and in the sidebar (#6124)David Underwood
Federate custom emojis with accounts
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
2018-01-03[!] Sanitize incoming classlist properly (#6162)puckipedia
* Sanitize classlist properly * Actually properly sanitize every class after the first * Improve Formatter spec to check for multiple classes and non-space whitespace
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
2017-09-16Escape URL parts on formatting local status (#4975)unarist
2017-09-14Enable to recognize most kinds of characters as URL paths (#4941)ふぁぼ原
2017-09-06Switch to static URIs, new URI format in both protocols for new statuses (#4815)Eugen Rochko
* Decouple Status#local? from uri being nil * Replace on-the-fly URI generation with stored URIs - Generate URI in after_save hook for local statuses - Use static value in TagManager when available, fallback to tag format - Make TagManager use ActivityPub::TagManager to understand new format - Adjust tests * Use other heuristic for locality of old statuses, do not perform long query * Exclude tombstone stream entries from Atom feed * Prevent nil statuses from landing in Pubsubhubbub::DistributionWorker * Fix URI not being saved (#4818) * Add more specs for Status * Save generated uri immediately and also fix method order to minimize diff. * Fix alternate HTML URL in Atom * Fix tests * Remove not-null constraint from statuses migration to speed it up
2017-06-17Whitelist allowed classes for federated statuses (#3810)nightpool
* Whitelist allowed classes for federated statuses Allowed classes are currently: - Any microformats class (h/p/u/dt/e-*) - the classes mention, hashtag, ellipses and invisible. this last one is somewhat suspect, but Mastodon currently uses it to render hidden link text. resolved #3790 * Fix code style
2017-06-04Remove some arguments of Formatter.instance.format and spec (#3541)Akihiko Odaki (@fn_aki@pawoo.net)
* Remove some arguments of Formatter.instance.format * Improve spec for Formatter
2017-05-24Add test when hashtag and URL are concatenated (#3279)abcang
2017-05-24Skip formatting for cashtag in status text (#3275)Yamagishi Kazutoshi
Resolve #3270
2017-05-12Prepend reblogs' wrapper content with "RT @original_author", (#3013)Eugen Rochko
so that when a reblog parse fails on another instance, it doesn't look like a misattributed/stolen text
2017-05-11Fix regressions from #2683 (#2970)Eugen Rochko
* Fix regressions from #2683 Properly format spoiler text HTML, while keeping old logic for blankness intact Process hashtags and mentions in spoiler text Format spoiler text for Atom Change "show more" toggle into a button instead of anchor Fix style regression on dropdowns for detailed statuses * Fix lint issue * Convert spoiler text to plaintext in desktop notifications
2017-05-09Fixed bug that timeline can not be displayed by InvalidURIError (#2947)abcang
2017-05-05use Twitter::Extractor for creating links (#2502)masarakki
2017-04-25Decodes URL containing IDN (#2436)Yamagishi Kazutoshi
2017-04-19Fix html escape characters in the URL (#2138)abcang
* fix character escaping in URL * add tests * put a comma after the last item * add HTML escape test
2017-02-22Fix #555 - Use a better URL parserEugen Rochko
2017-02-05Fix #61 - Add list of blocked users to the UI; clean up failed push ↵Eugen Rochko
notifications API Try to fix Travis CI setup
2017-01-24Fix #204, fix #515 - URL truncating is now a style so copypasting is notEugen Rochko
affected, replaced onClick handler with onMouseUp/Down to detect text selection not trigger onClick handler then
2016-12-13Improved admin UIEugen Rochko
2016-10-13Shorten rendered links (strip protocol and www, truncate to 30 chars), redirectEugen Rochko
to sign in page after sign up instead of root path which redirects to /about
2016-09-09Refactored generation of unique tags, URIs and object URLs into own classes,Eugen Rochko
as well as formatting of content