Commit graph

32 commits

Author SHA1 Message Date
Anton Khorev
6be766d015 Skip paragraphs with no text when looking for richtext description 2024-08-07 08:02:19 +03:00
Anton Khorev
88a7ca5625 Truncate long richtext descriptions 2024-08-07 08:02:06 +03:00
Anton Khorev
e5279dacde Detect <p> as richtext paragraph 2024-08-07 08:01:48 +03:00
Anton Khorev
aa8dd75e5e Use first paragraph as richtext description 2024-08-07 08:01:48 +03:00
Anton Khorev
097a414b22 Add a blank richtext description method 2024-08-07 08:01:14 +03:00
Anton Khorev
69a2d5f4d4 Add image_alt accessor to rich text 2024-08-05 05:08:44 +03:00
Anton Khorev
37edcb113a Skip images with missing src 2024-08-02 20:19:10 +03:00
Anton Khorev
25aea657e2 Detect <img> images in markdown rich text 2024-08-02 20:04:59 +03:00
Anton Khorev
c7353c9ac1 Add image method to get first image from rich text 2024-06-06 17:09:21 +03:00
Tom Hughes
a6b5f2f56d Adjust code for rails internal changes 2023-10-18 18:26:14 +01:00
Andy Allan
561ee71129 Rubocop autofix: ambiguous operator precedence
This simply adds braces to clarify which mathematical operator comes
first.
2022-04-06 14:55:29 +01:00
Andreas Geyer-Schulz
f6f23ed0ee
Fix typo: change 'noreferer' to 'noreferrer'
as the correct rel attribute in external links.
2020-01-25 20:10:23 +01:00
Tom Hughes
6f9b0c2f6b Fix rubocop warnings 2019-07-07 16:30:04 +01:00
Tom Hughes
df232ec96f Add noopener and noreferer to links in user generated content 2019-01-16 10:10:51 +00:00
Tom Hughes
1f3372f52c Switch to using kramdown for markdown formatting
Fixes #2103
2019-01-16 10:10:48 +00:00
Tom Hughes
f773f67958 Update to rails 5.1.4 2017-10-17 18:49:55 +01:00
Tom Hughes
12d3f94e3c Play a bit of whack-an-seo-mole 2017-05-18 15:02:21 +01:00
Tom Hughes
4e95ff1707 Allow redcarpet to add nofollow to links
This, using a new feature in redcarpet, allows us to avoid having
to subclass the renderer and implement links ourselves, which in
turn means that redcarpet's link sanitisation works.
2016-03-24 08:36:32 +00:00
Tom Hughes
5d3ecffa28 Fix new rubocop warnings 2016-02-05 13:35:26 +00:00
Tom Hughes
a6b84a0294 Fix more rubocop style issues 2015-02-24 23:12:02 +00:00
Tom Hughes
5cbd4038ed Fix rubocop style issues 2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00
Tom Hughes
cc4bca22b0 Update to rails 4.0.2 2013-12-03 21:09:10 +00:00
Tom Hughes
9dfb2729ab Revert "Use Redcarpet::Render::XHTML instead of our custom renderer"
This reverts commit 4bb95b3773.
2012-11-29 22:22:22 +00:00
Tom Hughes
4bb95b3773 Use Redcarpet::Render::XHTML instead of our custom renderer
Now that my :link_attributes patch has been merged we don't need
the custom renderer to add the rel=nofollow attributes.
2012-11-29 18:59:43 +00:00
Tom Hughes
f3c9f4edb4 Adjust spam scoring to try and reduce false positives 2012-03-20 13:28:57 +00:00
Tom Hughes
9492d20a87 Avoid dragging ActionView::Helpers::TextHelper into RichText objects
Dragging in TextHelper gets us a truncate method which hides the one
we inherited from String and which we want.
2012-03-19 12:01:02 +00:00
Tom Hughes
584806af92 Add rel="nofollow" to links generated from Markdown 2012-03-17 16:37:19 +00:00
Tom Hughes
98592e2903 Add a simple "text" format to the RichText module 2012-03-17 16:37:00 +00:00
Tom Hughes
8f4a9a4b87 Make spam scoring work with new rich text system 2012-03-17 16:36:58 +00:00
Tom Hughes
aa4205482a Treat all newly entered blocks of text as Markdown 2012-03-17 16:36:55 +00:00