discourse/app/serializers
Linca cd6542f21b
FEATURE: Allow safe HTML display in silence and suspend reasons (#33815)
Plugins likes Discourse AI might silence user with a reason message
contains HTML. For example,
1821e2b900/plugins/discourse-ai/config/locales/server.en.yml (L288)

This commit allows suspend and silence reasons to contain safe HTML to
be displayed on user pages and cards. The HTML will be sanitized before
being displayed, and unsafe HTML will be removed.
2025-07-25 10:28:11 +08:00
..
concerns DEV: Pass full model for tag to sidebar serializer (#32170) 2025-04-04 16:29:57 +08:00
about_serializer.rb FEATURE: Enable the new /about page for everyone (#29390) 2024-10-29 18:40:11 +03:00
admin_badge_serializer.rb FIX: Badge image uploader (#28188) 2024-08-01 15:36:17 +02:00
admin_badges_serializer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
admin_detailed_user_serializer.rb FIX: Admin can edit the name even if enable_names is disabled (#33170) 2025-06-16 09:24:17 +08:00
admin_email_template_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
admin_form_template_serializer.rb DEV: Create form templates (#20189) 2023-02-08 11:21:39 -08:00
admin_notice_serializer.rb FEATURE: Add ability to dismiss admin notices (#28916) 2024-09-17 14:43:34 +08:00
admin_plugin_serializer.rb PERF: Admin plugin preload settings routes (#31215) 2025-02-07 11:23:43 +10:00
admin_user_action_serializer.rb
admin_user_list_serializer.rb FEATURE: Allow safe HTML display in silence and suspend reasons (#33815) 2025-07-25 10:28:11 +08:00
admin_user_serializer.rb FEATURE: Add bulk destroy to admin users list (#29744) 2024-11-25 11:13:35 +03:00
admin_web_hook_event_serializer.rb FEATURE: Add Mechanism to redeliver all failed webhook events (#27609) 2024-07-08 15:43:16 -05:00
admin_web_hook_serializer.rb DEV: Block accidental serialization of entire AR models (#27668) 2024-07-01 17:08:48 -03:00
api_key_scope_serializer.rb
api_key_serializer.rb UX: Show scope mode in API key list (#31605) 2025-03-11 10:00:42 +08:00
application_serializer.rb DEV: Reduce duplication with DistributedMutex#clear_regex (#25795) 2024-02-21 14:19:04 -06:00
archetype_serializer.rb
associated_group_serializer.rb
auth_provider_serializer.rb FEATURE: add link to "associated accounts" providers (#33275) 2025-06-20 10:22:29 +02:00
backup_file_serializer.rb
badge_grouping_serializer.rb
badge_index_serializer.rb
badge_serializer.rb FEATURE: Show when a badge has been granted for a post (#29696) 2024-12-03 13:43:27 +11:00
badge_type_serializer.rb
basic_api_key_serializer.rb UX: Show scope mode in API key list (#31605) 2025-03-11 10:00:42 +08:00
basic_category_serializer.rb FEATURE: add icons and emojis to category (#31795) 2025-03-26 09:46:17 +04:00
basic_group_history_serializer.rb
basic_group_serializer.rb UX: Add descriptions to auto groups and auto group indicator (#28630) 2024-08-30 10:52:34 +10:00
basic_group_user_serializer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
basic_post_serializer.rb FEATURE: Show localized posts and topics based on user's locale (#32618) 2025-05-15 19:11:06 +08:00
basic_reviewable_flagged_post_serializer.rb
basic_reviewable_queued_post_serializer.rb
basic_reviewable_serializer.rb DEV: Include pending reviewables in the main tab in the user menu (#18471) 2022-10-05 12:30:02 +03:00
basic_reviewable_user_serializer.rb DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
basic_theme_serializer.rb FIX: N+1 in admin themes page (#32763) 2025-05-19 11:05:23 +08:00
basic_topic_serializer.rb FEATURE: Show localized posts and topics based on user's locale (#32618) 2025-05-15 19:11:06 +08:00
basic_user_badge_serializer.rb FIX: 500 error for missing badge grouping (#8446) 2019-12-03 18:37:01 +11:00
basic_user_serializer.rb FEATURE: Hide user status when user is hiding public profile and presence (#24300) 2024-02-26 17:40:48 +04:00
category_and_topic_lists_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
category_badge_serializer.rb FEATURE: add icons and emojis to category (#31795) 2025-03-26 09:46:17 +04:00
category_detailed_serializer.rb
category_group_serializer.rb
category_list_serializer.rb
category_required_tag_group_serializer.rb DEV: Ensure a broken tag_group relation doesn't raise an error (#16529) 2022-04-21 18:18:35 +01:00
category_serializer.rb DEV: Supplement updateCategory API doc to include localizations (#33601) 2025-07-15 22:03:33 +08:00
category_upload_serializer.rb
color_scheme_color_serializer.rb FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
color_scheme_selectable_serializer.rb DEV: Serialize theme_id and colors for user selectable color palettes (#31972) 2025-03-25 16:31:28 +10:00
color_scheme_serializer.rb FIX: N+1 in admin themes page (#32763) 2025-05-19 11:05:23 +08:00
component_index_serializer.rb FEATURE: Introduce new components listing page (#32164) 2025-04-08 17:58:29 +03:00
current_user_option_serializer.rb UX: Split hide_profile_and_presence user option (#29632) 2024-11-12 22:22:58 -03:00
current_user_serializer.rb FEAUTRE: Hide messages count in sidebar with feature flag (#33774) 2025-07-23 11:14:13 +10:00
detailed_tag_serializer.rb FIX: Include permissions in the tag serializer (#27849) 2024-07-11 19:59:57 +03:00
detailed_user_badge_serializer.rb
directory_column_serializer.rb
directory_item_serializer.rb FEATURE: Add links to searchable user fields in users directory and user profile (#29338) 2024-11-06 13:35:30 -04:00
discourse_version_check_serializer.rb
draft_serializer.rb
edit_directory_column_serializer.rb
email_log_serializer.rb FEAT: add cc addresses and post_id to sent email logs (#25014) 2024-01-03 09:27:25 +08:00
email_style_serializer.rb
embeddable_host_serializer.rb FEATURE: Extend embeddable hosts with Individual tags and author assignments (#26868) 2024-05-16 15:47:01 -04:00
embedding_serializer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
emoji_serializer.rb FEATURE - Add username column to custom emoji table (#29522) 2024-11-01 10:32:59 -05:00
flag_serializer.rb PERF: Avoid slow preloading in SiteSerializer (#33283) 2025-06-25 15:03:34 +08:00
flagged_topic_serializer.rb
flagged_topic_summary_serializer.rb
flagged_user_serializer.rb DEV: First pass of review queue redesign 2025-07-03 14:32:43 +08:00
flair_group_serializer.rb FEATURE: Let users select flair (#13587) 2021-07-08 10:46:21 +03:00
form_template_serializer.rb
found_user_serializer.rb FEATURE: Hide user status when user is hiding public profile and presence (#24300) 2024-02-26 17:40:48 +04:00
gap_serializer.rb
group_post_serializer.rb DEV: Adopt post list component and new posts route front-end (#30604) 2025-01-23 10:20:45 -08:00
group_post_user_serializer.rb
group_requester_serializer.rb
group_show_serializer.rb UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
group_user_serializer.rb FEATURE: Hide user status when user is hiding public profile and presence (#24300) 2024-02-26 17:40:48 +04:00
group_user_with_custom_fields_serializer.rb FEATURE: Hide user status when user is hiding public profile and presence (#24300) 2024-02-26 17:40:48 +04:00
grouped_screened_url_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
grouped_search_result_serializer.rb FIX: Load categories with search topic results (#25700) 2024-02-21 17:29:47 +02:00
hidden_profile_serializer.rb UX: Show message and chat buttons on hidden profiles (#27326) 2024-06-10 10:38:22 -03:00
inactive_user_serializer.rb
incoming_email_details_serializer.rb
incoming_email_serializer.rb
invite_link_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
invite_serializer.rb FEATURE: Add description to invites (#33207) 2025-06-16 11:31:07 +08:00
invited_serializer.rb
invited_user_record_serializer.rb
invited_user_serializer.rb
listable_topic_serializer.rb FEATURE: Also localize topic excerpts (#32839) 2025-05-21 17:49:27 +08:00
new_post_result_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
notification_serializer.rb FEATURE: add new hidden site setting to show full names in user card 2025-01-23 12:26:59 -05:00
penalty_counts_serializer.rb
pending_post_serializer.rb
permalink_serializer.rb FEATURE: Permalinks for users (#25552) 2024-02-05 17:31:31 +01:00
post_action_type_serializer.rb FIX: serialize Flags instead of PostActionType (#28362) 2024-08-14 12:13:46 +10:00
post_action_user_serializer.rb
post_item_excerpt.rb
post_localization_serializer.rb FEATURE: Add post language on creating a new post (#33160) 2025-06-11 10:39:01 -07:00
post_revision_serializer.rb FEATURE: Display locale change in post history modal (#33469) 2025-07-03 23:08:47 +08:00
post_serializer.rb DEV: Prevent N+1 for localizations on topic show (#33674) 2025-07-18 10:53:55 +08:00
post_stream_serializer_mixin.rb FEATURE: Add attribution to staff notice and rename functionality (#30920) 2025-01-24 09:29:22 +10:00
post_wordpress_serializer.rb
poster_serializer.rb
presence_channel_state_serializer.rb DEV: Introduce PresenceChannel API for core and plugin use 2021-08-27 16:26:06 +01:00
primary_group_serializer.rb FEATURE: Let users select flair (#13587) 2021-07-08 10:46:21 +03:00
private_message_topic_tracking_state_serializer.rb FEATURE: Display unread and new counts for messages. (#14059) 2021-08-25 11:17:56 +08:00
published_page_serializer.rb
queued_post_serializer.rb
remote_theme_serializer.rb FIX: Hide broken theme about/license URLs (#29930) 2024-11-26 13:53:10 +10:00
reviewable_action_serializer.rb FEATURE: Display a toast popup after completing a review action. (#31786) 2025-03-18 11:26:59 +11:00
reviewable_bundled_action_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
reviewable_claimed_topic_serializer.rb FEATURE: Sync Reviewable Status (#31901) 2025-03-24 14:27:18 +11:00
reviewable_conversation_post_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
reviewable_conversation_serializer.rb
reviewable_editable_field_serializer.rb
reviewable_explanation_serializer.rb
reviewable_flagged_post_serializer.rb FEATURE: Reason and deleted content support in the review queue (#30295) 2024-12-17 11:44:46 +11:00
reviewable_history_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
reviewable_note_serializer.rb DEV: Add a ReviewableNote model, and tie it into the Reviewable model. (#33047) 2025-06-04 09:33:02 +10:00
reviewable_perform_result_serializer.rb DEV: Remove legacy user menu (#21308) 2023-05-17 09:16:42 -07:00
reviewable_post_serializer.rb FEATURE: Review every post using the review queue. (#12734) 2021-04-21 08:41:36 -03:00
reviewable_queued_post_serializer.rb
reviewable_score_explanation_serializer.rb
reviewable_score_serializer.rb FEATURE: Highlight watched words found in reviewables. (#32167) 2025-04-04 17:26:14 +11:00
reviewable_score_type_serializer.rb FEATURE: Reason and deleted content support in the review queue (#30295) 2024-12-17 11:44:46 +11:00
reviewable_serializer.rb DEV: First pass of review queue redesign 2025-07-03 14:32:43 +08:00
reviewable_settings_serializer.rb
reviewable_topic_serializer.rb FEATURE: Sync Reviewable Status (#31901) 2025-03-24 14:27:18 +11:00
reviewable_user_serializer.rb FEATURE: Allow rejected user details to be scrubbed (#31987) 2025-03-31 12:40:35 +11:00
screened_email_serializer.rb
screened_ip_address_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
screened_url_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
search_logs_serializer.rb
search_post_serializer.rb DEV: Get headline excerpt config from GroupedSearchResult in serializer. (#20942) 2023-04-03 15:02:42 -03:00
search_result_user_serializer.rb
search_topic_list_item_serializer.rb Revert "PERF: Reduce size of search payload by removing unused topic attributes." 2020-07-23 09:25:31 +08:00
sidebar_section_serializer.rb
sidebar_tag_serializer.rb UX: Display tag's description as title in navigation menu (#22710) 2023-07-24 08:07:37 +08:00
sidebar_url_serializer.rb FIX: Simplify sidebar custom link implementation (#26201) 2024-03-20 12:55:40 +00:00
similar_admin_user_serializer.rb
similar_topic_serializer.rb
single_sign_on_record_serializer.rb
site_category_serializer.rb DEV: Try fix category form template flaky (#22461) 2023-07-06 14:42:59 +10:00
site_serializer.rb PERF: Avoid slow preloading in SiteSerializer (#33283) 2025-06-25 15:03:34 +08:00
site_text_serializer.rb
skipped_email_log_serializer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
suggested_topic_serializer.rb DEV: Use PosterSerializer for SuggestedTopicSerializer posters (#25650) 2024-02-12 14:04:02 -06:00
suggested_topics_mixin.rb PERF: Ensure suggested topics is only loaded on last page of topic view (#28507) 2024-08-23 16:10:50 +08:00
tag_group_serializer.rb FIX: ensure GroupChooser works with localized group names (#30593) 2025-01-13 11:29:04 +01:00
tag_serializer.rb SECURITY: Default tags to show count of topics in unrestricted categories (#19916) 2023-01-20 09:50:24 +08:00
theme_field_serializer.rb DEV: Add skip_migrations param when importing remote theme (#25218) 2024-01-11 14:04:02 +08:00
theme_index_serializer.rb PERF: Improve performance of the new themes listing page (#32641) 2025-05-08 19:18:07 +03:00
theme_objects_setting_metadata_serializer.rb DEV: Change category type to categories type for theme object schema (#26339) 2024-03-27 10:54:30 +08:00
theme_serializer.rb DEV: Use themeable site settings for Horizon (#33645) 2025-07-24 12:20:34 +10:00
theme_settings_serializer.rb FIX: Add humanized setting names for theme setting serializer (#33341) 2025-06-25 16:53:28 +10:00
theme_translation_serializer.rb
topic_embed_serializer.rb
topic_flag_type_serializer.rb FIX: Return properly interpolated translations for flag types 2024-07-30 18:30:57 +02:00
topic_link_serializer.rb
topic_list_item_serializer.rb DEV: TopicListItemSerializer tells if topic is among the top 100 hottest topics (#31935) 2025-03-24 11:55:14 -05:00
topic_list_serializer.rb FEATURE: dynamic search when in /filter route (#33614) 2025-07-22 16:08:10 +10:00
topic_localization_serializer.rb FEATURE: Add post language on creating a new post (#33160) 2025-06-11 10:39:01 -07:00
topic_pending_post_serializer.rb
topic_post_count_serializer.rb FIX: Show auto-group flair according to user preferences (#21221) 2023-04-24 16:04:26 -03:00
topic_poster_serializer.rb
topic_timer_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topic_tracking_state_item_serializer.rb PERF: optimise serialization for topic tracking state (#20860) 2023-03-28 18:09:22 +11:00
topic_tracking_state_serializer.rb PERF: optimise serialization for topic tracking state (#20860) 2023-03-28 18:09:22 +11:00
topic_view_bookmark_serializer.rb DEV: Block accidental serialization of entire AR models (#27668) 2024-07-01 17:08:48 -03:00
topic_view_details_serializer.rb
topic_view_posts_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topic_view_serializer.rb DEV: Remove 'experimental' prefix from settings (#33233) 2025-06-19 12:23:42 +08:00
topic_view_wordpress_serializer.rb
trust_level3_requirements_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
upload_serializer.rb DEV: serialize image upload thumbnail (#29276) 2024-10-18 12:55:14 +04:00
upload_thumbnail_serializer.rb DEV: serialize image upload thumbnail (#29276) 2024-10-18 12:55:14 +04:00
user_action_serializer.rb
user_auth_token_serializer.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
user_badge_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user_badges_serializer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_bookmark_base_serializer.rb
user_bookmark_list_serializer.rb FIX: Serialize categories for bookmarks (#26606) 2024-04-17 17:23:47 +03:00
user_card_serializer.rb FEATURE: Make it easier for staff to see if a profile is silenced (#33537) 2025-07-14 12:44:31 +08:00
user_export_serializer.rb FIX: User profile not loading with an empty export (#31290) 2025-02-11 16:18:06 -07:00
user_field_serializer.rb FEATURE: Implement new required options in admin user fields UI (#27079) 2024-05-23 19:18:25 +08:00
user_history_serializer.rb
user_name_serializer.rb
user_notification_schedule_serializer.rb DEV: Use serializers for user_notification_schedule and featured_topic (#27719) 2024-07-05 00:00:24 -03:00
user_notification_total_serializer.rb DEV: Dedicated route for current user notification counts (#26106) 2024-03-15 12:08:37 -04:00
user_option_serializer.rb UX: Split hide_profile_and_presence user option (#29632) 2024-11-12 22:22:58 -03:00
user_post_bookmark_serializer.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
user_post_topic_bookmark_base_serializer.rb
user_serializer.rb Added button to remove password from account (#32200) 2025-04-09 09:32:51 -05:00
user_status_serializer.rb
user_summary_serializer.rb FEATURE: add icons and emojis to category (#31795) 2025-03-26 09:46:17 +04:00
user_tag_notifications_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user_topic_bookmark_serializer.rb
user_with_custom_fields_serializer.rb FEATURE: Hide user status when user is hiding public profile and presence (#24300) 2024-02-26 17:40:48 +04:00
user_wordpress_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
watched_word_list_serializer.rb DEV: Refactor watched words (#24163) 2023-11-01 16:41:10 +02:00
watched_word_serializer.rb FEATURE: add HTML replacements 2024-05-14 10:41:27 +02:00
web_hook_category_serializer.rb
web_hook_event_type_serializer.rb DEV: Block accidental serialization of entire AR models (#27668) 2024-07-01 17:08:48 -03:00
web_hook_flag_serializer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
web_hook_group_serializer.rb
web_hook_group_user_serializer.rb
web_hook_like_serializer.rb
web_hook_post_serializer.rb FEATURE: Show when a badge has been granted for a post (#29696) 2024-12-03 13:43:27 +11:00
web_hook_topic_view_serializer.rb DEV: Remove summarization code (#27373) 2024-07-02 08:51:47 -07:00
web_hook_user_serializer.rb DEV: allow themes to render their own custom homepage (#26291) 2024-04-02 11:05:08 -04:00
wizard_field_choice_serializer.rb DEV: Generate correct i18n keys for wizard radio choices (#28370) 2024-08-14 14:39:18 +02:00
wizard_field_serializer.rb
wizard_serializer.rb UX: Add Styling step to wizard (#14132) 2021-08-25 17:10:12 -04:00
wizard_step_serializer.rb DEV: Cleanup unused wizard illustrations (#23659) 2023-09-26 10:34:38 +08:00